I'm running gnuplot 5.2-8 on Archlinux. If I change the default offsets, for example by running
set offsets graph .05, graph .05, graph .05, graph .05
then scrolling with the mouse wheel behaves almost like zooming out: it seems like the offsets are applied every time the plot is scrolled, which results in wider and wider axis ranges.
I hope my explanation is clear. This bug can be reproduced by running:
set term qt
set offsets graph .05, graph .05, graph .05, graph .05
plot sin(x)
and use the mouse wheel to scroll up and down a few times. You should see the axis become wider and wider.
I have also tested it with the x11 and wxt terminals; the behavior is the same.
This behaviour is not new, it goes back at least to gnuplot version 4. But I agree with you that this is undesirable.
Ethan, thanks for looking into this.
I just had a chance to test the fix. Scrolling now works much better and is quite usable.
However, the offsets specified in
~/.gnuplotare lost when scrolling. Autoscaling applies them again. I think the ideal behavior would be to maintain the offsets while scrolling.Hmm. I'll have to think about that. My inclination is that whenever there is an explicit axis range the offsets should be ignored. Why should scrolling change that?
I think the question is, which has priority, an axis range set indirectly by scrolling, or an offset specification? The user is explicitly configuring the offset, but scrolling doesn't "feel" like explicitly changing the plot configuration. My personal preference is to always keep the offsets, but I think it's also reasonable to prefer the opposite approach.
Last edit: MBaz 2020-02-20