mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

Zooming out after zooming in for a plot in MSlice does not result in the initial plot #574

Open SilkeSchomann opened 3 years ago

SilkeSchomann commented 3 years ago

Expected Behavior When zooming into a plot and zooming out again with the same number of zoom steps the initial plot should be displayed again.

Actual Behavior Occasionally the resulting plot is different from the initial plot.

Steps to reproduce the behavior This has been observed in different plots but seems to be most common in interactive cut plots.

  1. Open MSlice
  2. Load any data
  3. Go to the Workspace Manager tab
  4. Click on the Slice tab and then on Display
  5. Click on Interactive Cuts
  6. Select an area in the plot
  7. Zoom in and then out again in the cut plot
mducle commented 3 years ago

Yes, I've seen this bug around a few times, but I'm not sure how to fix it. The zoom in button is just mapped to Matplotlib's NavigationToolbar2QT.zoom whilst the zoom out is just mapped to NavigationToolbar2QT.back - so it always seemed to me that it was an issue with Matplotlib... For the interactive cut it could be that when we update the cut that matplotlib resets the zoom so back means a different thing to what the users would expect.

MialLewis commented 2 years ago

I've tried to recreate this, but not sure I am seeing the same bug. I have seen a few occasions where the zoom out button seems to "double zoom" i.e. if you zoom in 4 times it only takes 3 zoom outs to restore the original plot. I have not seen a material difference in the plot you start with and the plot you end with after zooming (aside from taking a different number of zoom in/outs to reach that point)?