What I mean is, provide support for doing:
gnuplot = Gnuplot.open
....
gnuplot.close
This way you can start gnuplot and have the process running and do multiple graphs from different parts of your code. This avoids starting up a gnuplot process for each plotting operation.
This could be achieved by simply doing:
if (block_given?) IO::popen( cmd, "w") { |io| yield io }
else IO::popen( cmd, "w")
at the openmethod