SciRuby / plotrb

A plotting library in Ruby built on top of Vega and D3.
Other
23 stars 6 forks source link

added simplified method for making a 2D scatter plot #1

Closed cjfuller closed 11 years ago

cjfuller commented 11 years ago

This is a bit of code that lets you make a scatter plot with sensible defaults in as little code as:

x = [0,1,2,3]
y = [0,1,4,9]
Plotrb::Simple.scatter(x,y)

Hash keyword args are also available to customize some of the plot style.

zuhao commented 11 years ago

Thanks @cjfuller! Very clever to make it short and sweet. :+1: