From: Joel VanderWerf Date: 2006-05-18T04:21:36+09:00 Subject: Re: ruby/gnuplot on windows Jon Dean wrote: > Joel VanderWerf wrote: >> I've never used this particular ruby-gnuplot library, but the following >> works for me with gnuplot 4.0: >> >> C:\prj\gnuplot\bin>irb >> irb(main):001:0> gp = "pgnuplot" >> => "pgnuplot" >> irb(main):002:0> pi = IO.popen(gp, "w") >> => # >> irb(main):003:0> pi.puts "plot sin(x)" >> => nil >> >> The plot window stays up and lets you manipulate it with the mouse. Just >> keep the pipe open. >> >> One small advantage of windows gnuplot is that if you go to the window >> menu (?) in the upper left corner, and select "options", you can print >> and do other neat stuff. >> >> My experience was that the -persist flag wasn't necessary on windows. > > What download of gnuplot 4.0 for windows did you use? I used the > gp400win32.zip which didn't have a bin directory. I ran the same Odd, gp400win32.zip is what I downloaded yesterday, and it does seem to have a bin dir. This is what it unpacks to: bin contrib demo install readme README.Windows bugs Copyright docs news readme.1st > command through irb and it works like you said because its in > interactive mode. I also don't appear to have a window menu. Is that > in the graph window or the command line window? Maybe the download > wasn't good. Anyway, I would like to run scripts through the command > line and not enter it each time through irb. That way, the persist flag > becomes necessary but I can't get it to work. Thanks for the help. Oh, you mean you want the gnuplot window to outlive the ruby process that sent it commands? I don't know of any way to do that on windows, short of writing a socket-listening wrapper around pgnuplot (drb would be helpful). The window menu I'm talking about should be in the upper left corner of the plot window. -- vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407