Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Roger Pack
RE: documentation [ reply ]  
2010-01-29 17:39
usually for colors etc. I have to mix it in to the "with" statement.

A patch that allows for otherwise would be welcome.

http://github.com/rdp/ruby_gnuplot

in terms of hotter,
http://ruby-toolbox.com/
"graphing"
lists more popular ones.

By: Teitur Arnarson
documentation [ reply ]  
2009-04-21 09:36
I'm a bit new to ruby, rails and gnuplot. I'm wondering if there is any documentation on which methods are available for the classes in the Gnuplot module for Ruby.

For instance, based on example code found on internet, I can produce a plot with the following code:

Gnuplot.open do |gp|
Gnuplot::Plot.new( gp ) do |plot|
plot.terminal 'png xddddff'
plot.output data_img_file
plot.xdata 'time'
plot.timefmt '"%Y-%m-%d %H:%M:%S"'
plot.xlabel "time"
plot.ylabel "spread"
plot.data << Gnuplot::DataSet.new( [spread_time, spread_value ] ) do |ds|
ds.using = "1:3"
ds.with = "lines"
ds.linewidth = 2
end
end

Now I want for instance to change color on the line, and I'm guessing it is a DataSet method, something like
ds.linecolor = "yellow"
but I'm unsuccessfull in guessing. Can I find a list of methods somewhere? Or can they maybe be derived from the gnuplot documentation in some unambiguous way?

Maybe the wrong forum for this question, but, is gnuplot maybe the wrong tool to go for (doesn't seem to be a lot of activity)? Is there a 'hotter' plotting tool for ruby?