Menu

#2232 [5.2-8] Bad interaction of `set offsets` with scrolling

None
closed-fixed
nobody
v5.4 (25)
2020-07-16
2020-02-09
MBaz
No

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.

Discussion

  • Ethan Merritt

    Ethan Merritt - 2020-02-10
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     
  • Ethan Merritt

    Ethan Merritt - 2020-02-10

    This behaviour is not new, it goes back at least to gnuplot version 4. But I agree with you that this is undesirable.

     
  • MBaz

    MBaz - 2020-02-10

    Ethan, thanks for looking into this.

     
  • MBaz

    MBaz - 2020-02-20

    I just had a chance to test the fix. Scrolling now works much better and is quite usable.

    However, the offsets specified in ~/.gnuplot are lost when scrolling. Autoscaling applies them again. I think the ideal behavior would be to maintain the offsets while scrolling.

     
    • Ethan Merritt

      Ethan Merritt - 2020-02-20

      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?

       
      • MBaz

        MBaz - 2020-02-20

        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
  • Ethan Merritt

    Ethan Merritt - 2020-07-16
    • Labels: --> v5.4
    • Status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB