Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

zoom/pan stack bug in 2.1.0 #9358

Copy link
Copy link
Closed
Closed
Copy link
@DeadParrot

Description

@DeadParrot
Issue body actions

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.