Skip to content

Instantly share code, notes, and snippets.

@domitry
Created March 21, 2014 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save domitry/9691324 to your computer and use it in GitHub Desktop.
Save domitry/9691324 to your computer and use it in GitHub Desktop.
Sample of the new Plotrb, GSoC2014
require 'plotrb'
N = 1000
x_arr = NVector.linspace(0, 5 * Math::PI, N)
y_arr = NMath.sin(x_arr)
line = Line.new(x: x_arr, y: y_arr) do
axis_titles(x: "x", y: "y")
legend(title: "sin")
end
line.display()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment