|
From: <pl...@pi...> - 2014-10-28 10:27:39
|
On 10/27/14 21:58, Ethan A Merritt wrote: > > On Monday, 27 October, 2014 21:30:04 pl...@pi... wrote: >> On 10/27/14 19:53, Ethan A Merritt wrote: >>> I've added to cvs for 5.0 and 5.1 a toggle button in the wxt tools widget. >>> >>> The very first time you use it, the state of the toggle button may not be >>> reported correctly because the corresponding state variable doesn't exist >>> in your previous saved-state file. But once you've exited the program >>> that first time, causing the saved-state to be updated, everything should work >>> correcly in subsequent sessions. >>> >>> I also have code to add save-to-png-file to the wxt toolbar. >>> But I haven't worked with this toolkit before and I haven't found a >>> decent worked example to show how to embed this in a pull-down menu. >>> So as before ... >>> >>>>> Patches welcome. >>> Ethan >>> >> >> Nice addition Ethan, thanks for putting that in. Having to hit replot >> every time I resize wxt was always a drag but never seemed important >> enough to mention. I'm not sure what purpose there is in the toggle >> option, when is it useful to have the plot temporarily not match the new >> terminal size? > > If you resize a complex 3D plot (e.g. the ones in transparent_solids.dem) > resizing the window can get really slow. Same thing for a comutationally > intensive 2D plot. It gets _really_ slow in some cases. For instance, > I have some data-plotting scripts that take ~5 seconds to redraw the plot. > Not so bad if the reason for redrawing is to change the data file. > But resizing the plot triggers the redraw multiple times, so it can be > more than a minute before the display settles down again. > I would normally keep this option "off". > > A better fix would be to only refresh when the resizing operation stops. > I'm sure that's possible, but would require bookkeeping that isn't in there > at present. > > Ethan > OK, that makes a lot of sense. I use wxt almost exclusively so did not realise that there were multiple re-drawings being triggered in other terminals resize ops. Obviously redrawing the plot while a resize is in progress is very wasteful. A simple test for mouse button pressed status could prevent this and would seem to be a simple test rather than book-keeping ( does anyone resize using keyboard? ). This also points out the need for a means to interrupt a plot process. I have hit this before when I did something unintentional and it got locked into doing something for several minutes without any apparent means to stop it without using kill -9 gnuplot ! Maybe there should be some periodic check for Esc or cntl-c keypress during plotting. Peter. |