Open protobits opened 14 years ago
I'd be happy to accept a pull request...or if not I might get around to it eventually.
oh I see what you're saying now... something like
@io ||+ IO::popen(cmd, "w")...
I don't understand that syntax =b
is gnuplot slow for you currently?
Hi, actually, I'm not using ruby_gnuplot for my project. I was just assessing the capabilities of your code so I could see if it would serve my needs. I ended up implemeting a very simple gnuplot interface in my ruby-gsl-ng code.
In any case, if you need to update the plot often (like I do, in a robotics simulator I developed) restarting the gnuplot process is out of the question. I've even had to resort to using binary data to speed things up.
leaving open since I think you can do multiple plots, as described...so maybe someday would make for a speedup.
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