Robert Dober wrote:
> On Fri, May 28, 2010 at 2:51 AM, Pen Ttt <myocean135 / yahoo.cn> wrote:
>> IO.popen('gnuplot', 'w') { |io|
>>  io.puts "plot sin(x)"
>> }
>> i tested ,it's ok
>> but i don't understand why is ('gnuplot', 'w'),why is not ('gnuplot',
>> 'r'),
> you are writing to the handle, right?
> BTW were there not some Ruby bindings for Gnuplot, not sure though.

There is a gnuplot gem which IIRC makes the gnuplot interface more 
object oriented.

I wrote a library that retains the native gnuplot command interface, but 
improves the experience in other ways (handling tempfiles and fixing 
some problems with window persistence and zombie processes). See this 
thread, for example:

http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/b69fce4b8b6b002b