examples/sincos.rb in pbosetti-flotr-1.3.4 vs examples/sincos.rb in pbosetti-flotr-1.3.5
- old
+ new
@@ -8,11 +8,11 @@
sin = Flotr::Data.new(:label => "Sin(x)", :color => "red")
cos = Flotr::Data.new(:label => "Cos(x)", :color => "blue")
100.times do |i|
- cos.data << [i, Math::cos(Math::PI / 100 * i)]
- sin.data << [i, Math::sin(Math::PI / 100 * i)]
+ cos << [i, Math::cos(Math::PI / 100 * i)]
+ sin << [i, Math::sin(Math::PI / 100 * i)]
end
plot = Flotr::Plot.new("Test plot")
plot.comment = "This is a test plot made with Flotr"
plot.options = {:legend_position => "ne", :points => 'true'}
\ No newline at end of file