daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Plotting::DataFrame::NyaplotLibrary#plot
Plots a DataFrame with Nyaplot on IRuby using the given options. Yields
the corresponding Nyaplot::Plot object and the Nyaplot::Diagram object
to the block, if it is specified. See the nyaplot docs for info on how to
further use these objects.
Detailed instructions on use of the plotting API can be found in the
notebooks whose links you can find in the README.
== Options
* +:type+ - Type of plot. Can be :scatter, :bar, :histogram, :line or :box.
* +:x+ - Vector to be used for X co-ordinates.
* +:y+ - Vector to be used for Y co-ordinates.
== Usage
# Simple bar chart
df = Daru::DataFrame.new({a:['A', 'B', 'C', 'D', 'E'], b:[10,20,30,40,50]})
df.plot type: :bar, x: :a, y: :bEdit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/plotting/nyaplot/dataframe.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Plotting--DataFrame--NyaplotLibrary-plot-for-pr
# Commit to gitgit add lib/daru/plotting/nyaplot/dataframe.rbgit commit -m "better docs for Daru::Plotting::DataFrame::NyaplotLibrary#plot"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--Plotting--DataFrame--NyaplotLibrary-plot-for-pr
hub pull-request
# Celebrate!