daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::Plotting::Vector::NyaplotLibrary#plot
Plots a Vector with Nyaplot on IRuby using the given options. Yields the
plot object (Nyaplot::Plot) and the diagram object (Nyaplot::Diagram)
to the block, which can be used for setting various options as per the
Nyaplot API.
== Options
type (:scatter, :bar, :histogram), title, x_label, y_label, color(true/false)
== Usage
vector = Daru::Vector.new [10,20,30,40], [:one, :two, :three, :four]
vector.plot(type: :bar) do |plot|
plot.title "My first plot"
plot.width 1200
endEdit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/plotting/nyaplot/vector.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--Plotting--Vector--NyaplotLibrary-plot-for-pr
# Commit to gitgit add lib/daru/plotting/nyaplot/vector.rbgit commit -m "better docs for Daru::Plotting::Vector::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--Vector--NyaplotLibrary-plot-for-pr
hub pull-request
# Celebrate!