With the gnuplot-qt 4.6.5-4 Debian package under Debian/unstable and the 'qt' terminal (which is now the default), zooming doesn't work.
The "zoom" documentation says:
Zooming is usually accomplished by holding down the left mouse button and dragging the mouse to delineate a zoom region. Some platforms may require using a different mouse button. The original plot can be restored by typing the 'u' hotkey in the plot window. The hotkeys 'p' and 'n' step back and forth through a history of zoom operations.
The optionzoomcoordinates
determines if the coordinates of the zoom box are drawn at the edges while zooming. This is on by default.
If the optionzoomjump
is on, the mouse pointer will be automatically offset a small distance after starting a zoom region with button 3. This can be useful to avoid a tiny (or even empty) zoom region.zoomjump
is off by default.
But holding down any mouse button doesn't have any effect in the 'qt' terminal. And the zoom buttons and the hotkeys don't have any effect either.
Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711141
EDIT: Debian bug report for the real issue:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711142
and in particular:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=711142#57
(I already replied via the Debian tracker)
This problem is not present in builds from the upstream source. So far as I am aware mousing has always worked fine with the qt terminal.
The problem only occurs when -persist is used and the main gnuplot program has terminated, e.g. after typing "quit" or with a shell command (or script):
$ gnuplot -persist <<EOF
plot '-' using 1:2 t '' with line
0 0
10 10
e
EOF
The 'wxt' terminal doesn't have such a problem.
Sorry, because I didn't know that there were 2 different issues, this comment was confusing: when I did the interactive vs -persist test, it was on a more complex graph, but I just gave a simple test case, which I knew it allowed me to reproduce the zoom bug. On this simple graph (which has a single segment), zoom always fails to work (even with 'wxt'), whether -persist is used or the test is done interactively while the main gnuplot program is still running.
See bug #1418
The documentation has been updated to explain that for most terminal types only a limited number of mousing operations are possible in a "persist"ent window after the main program has exited.
After further tests, there actually seem to be 2 issues, one with -persist (which isn't regarded as a bug), and another one, which also occurs while the main gnuplot program is running, but only when the result would contain a part of a single segment. A test without -persist:
xvii:~> GNUTERM=qt gnuplot
Terminal type set to 'qt'
gnuplot> plot '-' using 1:2 t '' with line
input data ('e' ends) > 0 0
input data ('e' ends) > 3 3
input data ('e' ends) > 6 8
input data ('e' ends) > e
gnuplot>
Then select any area that contains a part of a single segment (e.g. (1,2) to (2,1), or (4,7) to (5,1)) with the right button. I get a blank graph (only the axes). However if I select any area that contains (3,3), I get the correct result.
Diff:
This is the normal (default) clipping behavior.
gnuplot> show clip
If you want to see interior pieces of a line segment both of whose endpoints are off-screen, you need to say "set clip two".
Which reminds me that the 'set clip' command has non-obvious syntax. Anyone have suggestions for a better set of options than "set clip one" "set clip two"?
Grrr... SourceForge (and Firefox) lost again my reply!
OK. This is rather unintuitive: gnuplot is the only application I know where the zoom is not a real zoom!
This also means that the graphs (0,0)-(4,4) and (0,0)-(2,2)-(4,4) are not equivalent. This is weird.