Closed
Description
For plots after the first one created on a canvas the zoom/pan stacks can have _pos
== -1 and, due to a change in 2.1.0 (fb83117), this position offset error causes unzoom and unpan back operations to think they have reached the top of the stack one step before they have.
The code change that causes this was the removal of these lines from press_pan
and press_zoom
:
if self._views.empty():
self.push_current()
which reset the Stack _pos
to 0. Restoring this code corrects the issue but may not be the desired fix given the intended refactoring.
Matplotlib version
- Operating system: Windows
- Matplotlib version: 2.1.0
- Matplotlib backend (
print(matplotlib.get_backend())
): Qt4Agg - Python version: 2.7.14
- Other libraries: latest NumPy, PySide, ...
Metadata
Metadata
Assignees
Labels
No labels