X-y plots

I’m new to ruby and am looking for a way to create an x-y plot. Any
suggestions?

Jon

Gruff: http://nubyonrails.com/pages/gruff

On Sun, 14 May 2006, Jon D. wrote:

I’m new to ruby and am looking for a way to create an x-y plot. Any
suggestions?

http://www.ntecs.de/viewcvs/viewcvs/gd-graph/
http://www.ntecs.de/viewcvs/viewcvs/ruby-ploticus/

http://theory.kitp.ucsb.edu/~paxton/tioga.html

regards.

-a

http://rgnuplot.sourceforge.net/

Nice link, but a little out of date. An updated version (2.2) is
available
here:

http://rubyforge.org/projects/rgplot

I’m new to ruby and am looking for a way to create an x-y plot. Any
suggestions?

Combination of GNU plotutils and Ruby/GSL.
http://rubyforge.org/projects/rb-gsl/
http://rb-gsl.rubyforge.org/screenshot.html

Jon Egil S. wrote:

http://rgnuplot.sourceforge.net/

Nice link, but a little out of date. An updated version (2.2) is
available
here:

http://rubyforge.org/projects/rgplot

Ok, I should have mentioned that I am using windows. I tried
ruby/gnuplot but it doesn’t seam to work with windows. The problem
seams to be with the instantiation of a new Gnuplot process. From the
project webpage:

"Gnuplot.open

Instantiates a new Gnuplot process. The path to the executable is 

determined on a Unix or MacOSX system using the which command. Windows
users, I have no idea what to do. If a block is given to the function
the opened process is passed into the block. This mimics the most common
usage of the File.open method. "

Any idea how to get this working on windows? Or should I be using a
different graphing package?

unknown wrote:

On Tue, 16 May 2006, Jon D. wrote:

ruby/gnuplot but it doesn’t seam to work with windows. The problem

Any idea how to get this working on windows? Or should I be using a
different graphing package?

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161872

-a

Still not working, same problem with the .open method. I’ll run through
my steps for installing gnuplot and ruby/gnuplot:

gnuplot - downloaded gp400win32.zip from gnuplot website. Unzipped
files and stored in C:\Gnuplot. There were two executable files,
pgnuplot.exe and wgnuplot.exe. I renamed pgnuplot.exe to gnuplot.exe.

ruby/gnuplot - used gem install. Then set path variable in both user
variables and system variables to C:\Gnuplot. Also created RB_GNUPLOT
in system variables and set it to C:\Gnuplot\gnuplot.exe. Still doesn’t
work. I then tried to hardcode the path in the gnuplot.rb. Altered
line 22 “path = ENV[‘PATH’] # || ENV[‘WHAT_EVER_WINDOWS_PATH_VAR_IS’]”
to “path = ‘C:\Gnuplot’”. Also tried to add the gnuplot.exe. Still
doesn’t work.

What am I doing wrong?

-j

On Tue, 16 May 2006, Jon D. wrote:

-a
in system variables and set it to C:\Gnuplot\gnuplot.exe. Still doesn’t
work. I then tried to hardcode the path in the gnuplot.rb. Altered
line 22 “path = ENV[‘PATH’] # || ENV[‘WHAT_EVER_WINDOWS_PATH_VAR_IS’]”
to “path = ‘C:\Gnuplot’”. Also tried to add the gnuplot.exe. Still
doesn’t work.

What am I doing wrong?

i’m not sure and not at a windows box attm. i’ll try to look at this in
a
bit. hopefully someone else will chime in before then though…

regards.

-a

On Tue, 16 May 2006, Jon D. wrote:

ruby/gnuplot but it doesn’t seam to work with windows. The problem

Any idea how to get this working on windows? Or should I be using a
different graphing package?

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/161872

-a

unknown wrote:

On Tue, 16 May 2006, Jon D. wrote:

-a
in system variables and set it to C:\Gnuplot\gnuplot.exe. Still doesn’t
work. I then tried to hardcode the path in the gnuplot.rb. Altered
line 22 “path = ENV[‘PATH’] # || ENV[‘WHAT_EVER_WINDOWS_PATH_VAR_IS’]”
to “path = ‘C:\Gnuplot’”. Also tried to add the gnuplot.exe. Still
doesn’t work.

What am I doing wrong?

i’m not sure and not at a windows box attm. i’ll try to look at this in
a
bit. hopefully someone else will chime in before then though…

regards.

-a

ok, thanks. Just in case it helps, part of the error I get is that the
‘+’ is an undefined method in gnuplot.rb line 45.

-j

Jon D. wrote:

i’m not sure and not at a windows box attm. i’ll try to look at this in
a
bit. hopefully someone else will chime in before then though…

regards.

-a

ok, thanks. Just in case it helps, part of the error I get is that the
‘+’ is an undefined method in gnuplot.rb line 45.

-j

I’ve made a bit of progress. On line 46 of the gnuplot.rb, I changed:
cmd += " -persist" if persist to :
cmd = “C:\Gnuplot\gnuplot.exe” + " -persist" if persist

The graph pops up for a very brief period and then terminates. The
program is the sine wave example from the ruby/gnuplot home page how to.
It appears as if the pesist flag is not working correctly, but I’m not
sure how to fix this.

-j

Hi, I just had this problem and that solved it. Thanks.

Regards.

i’m not sure and not at a windows box attm. i’ll try to look at this in
a
bit. hopefully someone else will chime in before then though…

regards.

-a

ok, thanks. Just in case it helps, part of the error I get is that the
‘+’ is an undefined method in gnuplot.rb line 45.

-j

I’ve made a bit of progress. On line 46 of the gnuplot.rb, I changed:
cmd += " -persist" if persist to :
cmd = “C:\Gnuplot\gnuplot.exe” + " -persist" if persist

The graph pops up for a very brief period and then terminates. The
program is the sine wave example from the ruby/gnuplot home page how to.
It appears as if the pesist flag is not working correctly, but I’m not
sure how to fix this.

-j