Title: FIX: put Nav Home view back inside pan/zoom by jklymak · Pull Request #9958 · matplotlib/matplotlib · GitHub
Open Graph Title: FIX: put Nav Home view back inside pan/zoom by jklymak · Pull Request #9958 · matplotlib/matplotlib
X Title: FIX: put Nav Home view back inside pan/zoom by jklymak · Pull Request #9958 · matplotlib/matplotlib
Description: PR Summary Fixes #9863 The GUI home state was being set on the first draw() due to PRs #6598 #9359. However, draw is called by some tools to get fontsizes etc, and some users were changing plot parameters after that draw(). This reverts to the home state being set in Pan and Zoom if the Home state is empty. Other tools should include the same logic if they want to register the Home state when they are called: if self._nav_stack() is None: # set the home button to this view self.push_current() Happy if someone has a better solution. Perhaps instead of at draw time, the appropriate time is when the toolbar is created (NavigationToolbar2.__init__?). The test is the same as in #9863: import numpy as np import matplotlib.pyplot as plt x = np.random.rand(10, 10) f, ax = plt.subplots() ax.pcolormesh(x) ax.figure.draw(ax.figure.canvas.get_renderer()) ax.invert_yaxis() plt.show() PR Checklist Has Pytest style unit tests Code is PEP 8 compliant New features are documented, with examples if plot related Documentation is sphinx and numpydoc compliant Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there) Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way
Open Graph Description: PR Summary Fixes #9863 The GUI home state was being set on the first draw() due to PRs #6598 #9359. However, draw is called by some tools to get fontsizes etc, and some users were changing plot pa...
X Description: PR Summary Fixes #9863 The GUI home state was being set on the first draw() due to PRs #6598 #9359. However, draw is called by some tools to get fontsizes etc, and some users were changing plot pa...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/9958
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:47aefb6b-c721-1aea-6004-7a5313b96e20 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E53E:23560F:22354E7:2EB7A95:6A5395D5 |
| html-safe-nonce | bfe955dd66ab488abb0fda10bab6897e42606f695a463b7e1093687ad991da29 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTNFOjIzNTYwRjoyMjM1NEU3OjJFQjdBOTU6NkE1Mzk1RDUiLCJ2aXNpdG9yX2lkIjoiMTk0ODM1OTE5OTE4NTY3MTYzNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 95f90d662ec0adde8c4be386972652f66f177f45ba2c18d60894c7553783481c |
| hovercard-subject-tag | pull_request:157300991 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/matplotlib/matplotlib/pull/9958/files |
| twitter:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1562854?s=400&v=4 |
| og:image:alt | PR Summary Fixes #9863 The GUI home state was being set on the first draw() due to PRs #6598 #9359. However, draw is called by some tools to get fontsizes etc, and some users were changing plot pa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| 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