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: :b

Source | Google | Stack overflow

Edit

git clone [email protected]:sciruby/daru.git

cd daru

open lib/daru/plotting/nyaplot/dataframe.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Daru--Plotting--DataFrame--NyaplotLibrary-plot-for-pr


# Commit to git

git add lib/daru/plotting/nyaplot/dataframe.rbgit commit -m "better docs for Daru::Plotting::DataFrame::NyaplotLibrary#plot"


# Open pull request

gem 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!