|
From: John W. E. <jw...@be...> - 2005-10-11 19:22:14
|
On 10-Oct-2005, Paul Kienzle wrote: | Any idea how difficult it would be to extend octave/gnuplot to support | multiple figures natively? The fix for Octave, independent of any changes to gnuplot, would be to open a separate connection to gnuplot for each figure (i.e., one gnuplot process per figure). In the current sources, you'd need to do this in the src/DLD-FUNCTIONS/gplot.l file. Instead of // Pipe to gnuplot. static oprocstream *plot_stream = 0; we might want // Pipe to gnuplot. static oprocstream *current_plot_stream = 0; std::map<int,oprocstream *> plot_stream_map; to map figure numbers to plot stream objects. The current figure.m should maybe become a built-in function that handles opening plot streams and manages the plot_stream_map and the variable __current_figure__. Currently this variable is only defined as a global in the scripting language, but that should probably become a variable in gplot.l that is exported to the scripting language. jwe |