Title: Let widgets/clabel better handle overlapping axes. by anntzer · Pull Request #25555 · matplotlib/matplotlib · GitHub
Open Graph Title: Let widgets/clabel better handle overlapping axes. by anntzer · Pull Request #25555 · matplotlib/matplotlib
X Title: Let widgets/clabel better handle overlapping axes. by anntzer · Pull Request #25555 · matplotlib/matplotlib
Description: In general, using event.inaxes/event.xdata/event.ydata can be error-prone when there are overlapping axes, because only the topmost axes is the "in"-axes. In the specific case of widgets/clabel, in particular, we can instead check whether an event occurred over the axes and if so compute xdata/ydata accordingly. Doing so allows correct handling of widgets on axes for which there's also a twin axes on top of it. Changes in the tests (other than the change in test_span_selector, which tests the functionality here) ensure that the synthetic button presses indeed occur on top of the desired axes (previously, do_event would directly set event.inaxes and we'd just believe that "as is"). Closes #10009 (by actually fixing the issue, not by documenting the limitation). Also closes #25030. PR Summary PR Checklist Documentation and Tests Has pytest style unit tests (and pytest passes) Documentation is sphinx and numpydoc compliant (the docs should build without error). New plotting related features are documented with examples. Release Notes New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/ API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/ Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst
Open Graph Description: In general, using event.inaxes/event.xdata/event.ydata can be error-prone when there are overlapping axes, because only the topmost axes is the "in"-axes. In the specific case of widgets/...
X Description: In general, using event.inaxes/event.xdata/event.ydata can be error-prone when there are overlapping axes, because only the topmost axes is the "in"-axes. In the specific case of ...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/25555
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1697eb45-2cee-9857-92a0-ab8752ca8b8e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9B66:2C2387:A25C4:DA234:6A52BDE4 |
| html-safe-nonce | 2422b0992647ba1d0d3cd8cace6ad7e022722f23231271fe5139e740379a00c5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QjY2OjJDMjM4NzpBMjVDNDpEQTIzNDo2QTUyQkRFNCIsInZpc2l0b3JfaWQiOiI0NDQ3NjMxNzg1NzY2MDc1ODc2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 02a4a0995371cceee4b465b637b8fa8587174837a63cd49b0966a4ef1c980c78 |
| hovercard-subject-tag | pull_request:1290489991 |
| 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/25555/files |
| twitter:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1322974?s=400&v=4 |
| og:image:alt | In general, using event.inaxes/event.xdata/event.ydata can be error-prone when there are overlapping axes, because only the topmost axes is the "in"-axes. In the specific case of widgets/... |
| 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 full-width |
| 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