|
From: Ben A. <bpa...@ma...> - 2008-12-30 02:22:20
|
On Dec 29, 2008, at 9:00 PM, Daniel J Sebald wrote: > Ben Abbott wrote: >> On Dec 29, 2008, at 1:34 PM, Ethan Merritt wrote: >>> On Monday 29 December 2008 10:04:32 Ben Abbott wrote: >>> >>>> On Dec 29, 2008, at 12:25 PM, Ethan A Merritt wrote: >>>> >>>> >>>>> On Monday 29 December 2008, Ben Abbott wrote: >>>>> >>>>> >>>>>>>>>> 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. >>>>>>>> >>>>>>>> I'm not sure I understand the context correctly, but ... what >>>>>>>> of >>>>>>>> multiplot? ... there can be multiple plot commands that do not >>>>>>>> delete >>>>>>>> anything correct? ... this is the way Octave draws everything. >>>>>>> >>>>>>> It probably should not do that. Do you know why it does? >>>>>> >>>>>> Octave & Matlab each place multiple plots in each figure >>>>>> window. By >>>>>> multiple plots, I mean multiple axes in one window. Some axes >>>>>> might >>>>>> be >>>>>> 2D of various types and others 3D. >>>>> >>>>> It seems to me that this would be better done by opening separate >>>>> windows >>>>> for each plot, perhaps tiled to be adjacent. That would let >>>>> you edit >>>>> and interact with each component plot separately, which is not >>>>> possible >>>>> for the separate components of a multiplot. >>>>> >>>>> Easy for me to say - I am neither programming nor using Octave. >>>> >>>> I agree. However, that would break compatibility with Matlab ... >>>> which >>>> is actually what I'm attempting to improve. >>> >>> Well, I'm totally lost. I don't understand why it would make any >>> difference to the user, other than the gain in functionality. >>> >>> >>>> Am I correct in inferring that rotation of plots does work but >>>> zooming >>>> does not (which is what I observe for Octave's gnuplot windows on >>>> Mac >>>> OSX). >>> >>> No, this is not correct. At least, not if you have correctly >>> described >>> how Octave uses multiplot. You cannot interact with the individual >>> component plots of a multiplot. Not zooming, not rotation, >>> not mouse tracking, no toggling ruler/grid/logscale, none of that. >>> Doing things inside multiplot severely limits the features that >>> gnuplot would normally give you automatically. >>> >>> >>>>> you still have not explained why you (or Octave) would >>>>> want to close and re-open the terminal plot window before starting >>>>> a new plot. What do you gain by this? >>>> >>>> Opps, I apparently wasn't clear in my description. >>>> >>>> Octave may have many plot windows open simultaneously. Each >>>> gnuplot >>>> window contains one Octave figure whose objects may be modified >>>> via a >>>> command line interface at the users discretion. The user may >>>> close a >>>> figure's window either via the mouse or via the command line. >>>> >>>> I've added support for the position and size options of the x11 >>>> terminal to my local code for octave. I notice that the x11 >>>> terminal >>>> only respects these properties for the first instance of "set >>>> termina >>>> x11 ..." in the plot stream. This is different than how the aqua >>>> and >>>> wxt terminals behave. Meaning that each time I change the terminals >>>> size, both the aqua and wxt windows change their size >>> >>> >>> I think you are either doing something wrong, or failing to explain >>> the difference between what you are seeing and what you are >>> expecting. >>> The following sequence of commands will open three separate x11 plot >>> windows with different sizes. Each window can be managed >>> separately. >>> This behaviour may not be truly identical to that for wxt, but so >>> far >>> as I know the differences are subtle rather than dramatic. >>> Do you have a counter-example? >>> >>> set term x11 1 title "Plot window #1" >>> plot foo >>> set term x11 2 title "Plot window #2" >>> splot baz >>> set term x11 3 title "3rd plot window" >>> plot blech >>> >>> # Close window 2, leave 1 and 3 unchanged: >>> set term x11 2 close >>> >>> # Replace the contents of window 1, leaving window 3 unchanged >>> set term x11 1 >>> plot new-stuff >>> >>> >>> >>>> Would it be possible for the x11 terminal to behave in the same >>>> manner? >>> >>> Please describe "same manner" more explicitly.' >> Ok, try this >> set term x11 1 size 500,400 position 100,100 >> plot sin(x) >> set term x11 1 size 500,200 position 300,100 >> close 1 >> plot sin(x) >> After the second plot command the window remains the same size and >> in the same position as the first. >> If I use the mouse to close the window prior to the second "plot >> sin(x)" then I get the effect I desire. > > Ben, > > I haven't followed this thread closely, but keep in mind that Octave > is currently programmed to create a new instance (process, version, > whatever) of gnuplot for every plot it creates. John did things > that way because gnuplot currently only has the mouse active in one > window due to the fact that plot data is not retained but for the > most recent plot. John figured gnuplot is small, so launch however > many versions of it that are required. > > So, I think that when you typed "close 1", gnuplot was completely > exited and a new plot command starts gnuplot from fresh. However, > when you used the mouse to close the window, the X11 window was > closed but gnuplot_x11 is still active so retains the information > about the window size before it was externally closed (not by > Octave, but by the mouse). > > Some work was done on retaining plotting data for all plots but I > think it is only in experimental stage right now. Such a feature > would enable Octave to not require opening a new version of gnuplot > for every new Octave plot. Also, my guess is that gnuplot would be > able to handle multiplot more robustly with data retention. There > is a bit of work on both sides of the exchange to do that integration. > > Dan ah-ha I'd not been aware that a new instance of gnuplot was created for each plot (although it is quite obvious now that you mention it). Thanks Ben |