Forum: Ruby x-y plots

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jon D. (Guest)
on 2006-05-14 10:21
I'm new to ruby and am looking for a way to create an x-y plot.  Any
suggestions?

Jon
Farrel L. (Guest)
on 2006-05-14 12:15
(Received via mailing list)
unknown (Guest)
on 2006-05-14 18:01
(Received via mailing list)
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://rgnuplot.sourceforge.net/
http://theory.kitp.ucsb.edu/~paxton/tioga.html

regards.

-a
unknown (Guest)
on 2006-05-14 18:41
(Received via mailing list)
>> 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. (Guest)
on 2006-05-14 19:36
(Received via mailing list)
> 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
Jon D. (Guest)
on 2006-05-15 21:10
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 (Guest)
on 2006-05-15 21:23
(Received via mailing list)
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/...

-a
Jon D. (Guest)
on 2006-05-15 22:44
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/...
>
> -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
unknown (Guest)
on 2006-05-16 00:01
(Received via mailing list)
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
jon dean (Guest)
on 2006-05-16 01:03
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. (Guest)
on 2006-05-16 06:41
>> 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
Tiago S. (Guest)
on 2008-03-06 02:19
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.
This topic is locked and can not be replied to.