From: Benoit Daloze Date: 2010-05-27T20:26:34+09:00 Subject: Re: how to call gnuplot from ruby? On 27 May 2010 13:07, Pen Ttt wrote: > i want to call gnuplot from ruby,my ruby script: > `gnuplot` < plot sin(x) > EOF > > > pt@pt-laptop:~$ ruby  /home/pt/r.rb  ,then i get : > >  G N U P L O T >  Version 4.2 patchlevel 6 >  last modified Sep 2009 >  System: Linux 2.6.32-22-generic > >  Copyright (C) 1986 - 1993, 1998, 2004, 2007 - 2009 >  Thomas Williams, Colin Kelley and many others > >  Type `help` to access the on-line reference manual. >  The gnuplot FAQ is available from http://www.gnuplot.info/faq/ > >  Send bug reports and suggestions to > > > > Terminal type set to 'wxt' > -- > Posted via http://www.ruby-forum.com/. > > With popen: IO.popen('gnuplot', 'w') { |io| io.puts "plot sin(x)" } If you want easier control for reading/writing, use open3. B.D.