|
From: | Daniel J Sebald |
Subject: | Re: __gnuplot_set__ fails as function call 2.9.1 |
Date: | Fri, 01 Apr 2005 13:51:09 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 |
John W. Eaton wrote:
Perhaps we should also eliminate __gnuplot_plot__ and __gnuplot_splot__ and only have a function to send commands to the gnuplot stream. Then we can eliminate the (always doomed to be broken in some way or another) parser. That would mean that you would have to write out the data files yourself: x = (-10:0.01:10)'; data = [x, sin(x)]; [fid, name] = mkstemp (sprintf ("%s/XXXXXX", P_tmpdir), 1); fprintf (fid, "%f %f\n", data'); fclose (fid); (though we might want to provide some convenience functions for the common types of files). then issue commands like gnuplot (sprintf ("plot \"%s\" using 1:2\n", name)); Of course, if you want to do something simple like this, you should be using "plot" instead, and then these details would be hidden from you and your scripts would continue to work even if Octave's default plotting engine changes to something other than gnuplot. Comments?
Could you please clarify the big picture on this? My understanding was that instead of having a plotting device at the core of Octave, it would be moved to the "__plot__", etc. m-scripts. There there could be any plotting utility. So what this would require is a unique set of m-scripts for, say, gnuplot commands. In those scripts would be a way to launch gnuplot and do the things you mention above.
I assume there will be other types of graphics packages put together this way.But how then does someone indicate their selection of which plotting utility to use? Is this something selected when installing?
How does one close gnuplot if it is launched from a plotting m file? Is there to be some hook into Octave that can call a command upon exit, just like .octaverc?
Dan
[Prev in Thread] | Current Thread | [Next in Thread] |