Title: zoom/pan stack bug in 2.1.0 · Issue #9358 · matplotlib/matplotlib · GitHub
Open Graph Title: zoom/pan stack bug in 2.1.0 · Issue #9358 · matplotlib/matplotlib
X Title: zoom/pan stack bug in 2.1.0 · Issue #9358 · matplotlib/matplotlib
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 t...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/9358
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zoom/pan stack bug in 2.1.0","articleBody":"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 (fb83117a9eb3083768d4e067414fe4dbea49e98e), 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.\r\n\r\nThe code change that causes this was the removal of these lines from `press_pan` and `press_zoom`:\r\n```python\r\nif self._views.empty():\r\n self.push_current()\r\n```\r\nwhich reset the Stack `_pos` to 0. Restoring this code corrects the issue but may not be the desired fix given the intended refactoring.\r\n\r\n**Matplotlib version**\r\n * Operating system: Windows\r\n * Matplotlib version: 2.1.0\r\n * Matplotlib backend (`print(matplotlib.get_backend())`): Qt4Agg\r\n * Python version: 2.7.14\r\n * Other libraries: latest NumPy, PySide, ...","author":{"url":"https://github.com/DeadParrot","@type":"Person","name":"DeadParrot"},"datePublished":"2017-10-11T02:58:30.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":15},"url":"https://github.com/9358/matplotlib/issues/9358"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aee16656-9e62-e461-30e6-ee47ce748b2a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEE4:19C73D:2A9A0DF:39F93F1:6A53B9CD |
| html-safe-nonce | 01f8441d2370e9c7f9454751469999cdca33a217c494a7737e9c95c3091098b5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUU0OjE5QzczRDoyQTlBMERGOjM5RjkzRjE6NkE1M0I5Q0QiLCJ2aXNpdG9yX2lkIjoiODM4NzA4ODc0MzAwMjI1Nzg2OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cd206116038ce51a2515aca54f9d9fff69b395d892d3892de3c216e69b3761c7 |
| hovercard-subject-tag | issue:264441542 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/9358/issue_layout |
| twitter:image | https://opengraph.githubassets.com/01400bce14de74892ab722cb95da5e9dbd79261d14a784c5e2f7d898457f86df/matplotlib/matplotlib/issues/9358 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/01400bce14de74892ab722cb95da5e9dbd79261d14a784c5e2f7d898457f86df/matplotlib/matplotlib/issues/9358 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | DeadParrot |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width