From: Ethan A M. <merritt@u.washington.edu> - 2008-12-29 02:10:52
|
On Sunday 28 December 2008, Ben Abbott wrote: > > So now I have another question. > > You are re-opening the same x11 display window for every plot. > > I don't understand why you want to do that, since you could just leave > > the previous window in place if the size is not supposed to change. > > > > Be that as it may, you could try explicitly closing the previous > > window > > before re-opening it: > > > > set term x11 1 size FOO,BAZ > > ...plot stuff > > > > set term x11 1 close > > set term x11 1 size FOO,BAZ > > ...plot different stuff > > I'm a bit uncertain about the terminology. > > What I understand is done in Octave is that a plot stream is opened > for a figure and it is not closed until the figure is deleted/closed. Maybe. But you are talking about the stream from Octave to gnuplot, I think? Rather than the stream from gnuplot to gnuplot_x11? > Are you suggesting that Octave's plot stream contain only one "set > terminal ..."? ... if so by what means is it possible to clear the > canvas and start from scratch? That happens every time you issue a "plot" command. You don't have to do anything special. Although there is a "clear" command if for some reason you want to blank the window but not draw anything. > It is not permissible for Octave to close the window and open a new > stream/window, as this would be a significant deviation from how > Matlab works and compatibility with Matlab is a rather important > feature. ?? But that seems to be what your test script is doing already. > Meaning a specific plot window should not change size/ > position unless the user specifically tells it to (which might be the > result of actions by the mouse). Again, that's what has always been the case for gnuplot also, and the ability to specify the initial size does not change it. > By the way, it would really be cool if there was a method by which the > size and position of a plot window could be determined. That way if a > user moves or resizes a window Octave could do some checking and have > some awareness of such (I'd be stunned if such were possible, but > thought I'd ask). You can do that with a call into xlib; you don't need any special code in gnuplot for that. You should be able to get all the info you'd get from the command line using "xwininfo". -- Ethan A Merritt Biomolecular Structure Center University of Washington, Seattle 98195-7742 |