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'),
i call gunplot from ruby  to get gnuplot's  output ,so maybe it's 
('gnuplot', 'r'),
when i use ('gnuplot', 'r'), can't get what i want,
could you tell me the reason of   ('gnuplot', 'w')?

-- 
Posted via http://www.ruby-forum.com/.