|
From: Jacques B. <jac...@no...> - 2004-12-16 18:41:08
|
I wish to use gnuplot to open several x11 terminals, and to change the active terminal interactively (with a mouse click for example), in order to be able to rescale the plot with the mouse (right clicks). 1) Is there a way to change the active terminal with a command, without redefining all the plot? (I didn't find a word about this in the manual) 2) Is there a _simple_ way to patch the source in order to activate the clicked terminal? (I tried but didn't get the expected behaviour) 3) I wish that the mouse coordinates in a _non-active_ x11 terminal were displayed according to the mouseformat defined for this terminal. Is it easy to patch? 4) Is there a completely different way to obtain a similar behaviour with the current gnuplot? |
|
From: Ethan M. <merritt@u.washington.edu> - 2004-12-16 21:13:55
|
On Thursday 16 December 2004 10:40 am, Jacques Bouchard wrote: > I wish to use gnuplot to open several x11 terminals, and to change the > active terminal interactively (with a mouse click for example), in order > to be able to rescale the plot with the mouse (right clicks). Clicking on the plot window will make it "active" for the window manager (KDE, gnome, whatever), but has no effect on gnuplot. Gnuplot has only one active plot, the one produced by the most recent plot or splot command. > 1) Is there a way to change the active terminal with a command, without > redefining all the plot? (I didn't find a word about this in the manual) Probably, but it will be a window manager command rather than a gnuplot command. > 2) Is there a _simple_ way to patch the source in order to activate the > clicked terminal? (I tried but didn't get the expected behaviour) What do you mean "activate"? If you mean "I can use zoom and replot" then this is not possible at all. It is a fundamental limitation of gnuplot that only the information for the most recent plot is available. > 3) I wish that the mouse coordinates in a _non-active_ x11 terminal were > displayed according to the mouseformat defined for this terminal. Is it > easy to patch? This, however, should work in both Version 4.0 and the cvs version. Are you saying that mousing does not work at all in the "old" plot windows, or just that the output format changes somehow? > 4) Is there a completely different way to obtain a similar behaviour > with the current gnuplot? Mousing is supposed to work. Zoom, replot, or other commands that require access to the original data can only work on the current (e.g. most recently drawn) plot window. -- Ethan A Merritt merritt@u.washington.edu Biomolecular Structure Center Mailstop 357742 University of Washington, Seattle, WA 98195 |
|
From: Michael A. K. <ma...@ll...> - 2004-12-17 13:00:25
|
Ethan Merritt wrote: > On Thursday 16 December 2004 10:40 am, Jacques Bouchard wrote: > >>I wish to use gnuplot to open several x11 terminals, and to change the >>active terminal interactively (with a mouse click for example), in order >>to be able to rescale the plot with the mouse (right clicks). The SAVE command might be useful. In the past I used "save x11-fig-NN.cmd", then moved on to my other plots. When I wanted window NN I could use a "load x11-fig-NN.cmd" to get the window back. I would wrap this procedure in a OPEN-FIGURE command that would do all the book-keeping for me. See below example. Hope this helps. -- --------------------- Dr Michael A. Koerber x3250 # EXAMPLE OF SAVE/LOAD FOR MULTIPLE X11 TERMS reset set term x11 2 set parametric plot t,sin(t) save "x11-fig-02.cmd" set term x11 3 set grid plot t,exp(-t)*sin(t) save "x11-fig-03.cmd" # Note that the SAVE command in at least # G N U P L O T # Version 4.0 patchlevel 0 # last modified Thu Apr 15 14:44:22 CEST 2004 # System: FreeBSD 4.10-RELEASE # comments out the SET TERM and SET OUTPUT lines. # These must be respecified, or a new terminal specified. set term x11 5 load 'x11-fig-02.cmd' set term x11 6 load 'x11-fig-03.cmd' |
|
From: Petr M. <mi...@ph...> - 2004-12-19 13:39:06
|
> >>I wish to use gnuplot to open several x11 terminals, and to change the > >>active terminal interactively (with a mouse click for example), in order > >>to be able to rescale the plot with the mouse (right clicks). > > The SAVE command might be useful. In the past I used "save > x11-fig-NN.cmd", then moved on to > my other plots. When I wanted window NN I could use a "load > x11-fig-NN.cmd" to get the window back. > I would wrap this procedure in a OPEN-FIGURE command that would do all > the book-keeping for me. See > below example. That would be nice to bind (see help bind) a hotkey to "load" such a configuration file for a given x11 window. However, binding to the "load" command does not work as both load and string_execute do some "extraordinary" things with the current command string and its parsing. That was just a note if someone finds how to fix it (I haven't found a way to solve this). --- PM |