Title: figure_enter_event uses now LocationEvent instead of Event. Fix issue #9812. by lkjell · Pull Request #9814 · matplotlib/matplotlib · GitHub
Open Graph Title: figure_enter_event uses now LocationEvent instead of Event. Fix issue #9812. by lkjell · Pull Request #9814 · matplotlib/matplotlib
X Title: figure_enter_event uses now LocationEvent instead of Event. Fix issue #9812. by lkjell · Pull Request #9814 · matplotlib/matplotlib
Description: PR Summary In the documentation 1 figure_enter_event uses LocationEvent. However, previously it just uses the base class Event. This cause some problem when trying to access LocationEvent attributes because they did not exist. This addresses issue #9812. Fix also an issue that tkagg backend does not have a figure_enter_event. gtk3, Qt5 and wx pass in coordinates when entering figure. The tkagg backend did not have a figure_leave_event. Enabling that as well. Sample script using Qt5 backend. Move the cursor in and out of the figure. import matplotlib matplotlib.use("Qt5Agg") import matplotlib.pyplot as plt import numpy as np x = range(100) fig, ax = plt.subplots() ax.plot(np.random.rand(10)) def stat(event): print("axes: {}, x: {}, y: {}".format(event.inaxes, event.x, event.y)) cid = fig.canvas.mpl_connect('figure_enter_event', stat) cid = fig.canvas.mpl_connect('figure_leave_event', stat) plt.show() PR Checklist Code is PEP 8 compliant
Open Graph Description: PR Summary In the documentation 1 figure_enter_event uses LocationEvent. However, previously it just uses the base class Event. This cause some problem when trying to access LocationEvent attribute...
X Description: PR Summary In the documentation 1 figure_enter_event uses LocationEvent. However, previously it just uses the base class Event. This cause some problem when trying to access LocationEvent attribute...
Opengraph URL: https://github.com/matplotlib/matplotlib/pull/9814
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/commits/:range(.:format) |
| route-controller | pull_requests |
| route-action | commits |
| fetch-nonce | v2:5de7a460-2ff3-818e-5265-440bd55d0294 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A164:24FBC5:1F8ACB0:2AA748F:6A655599 |
| html-safe-nonce | 1925042a5aa76245a0cea31d9aa8d953d310a1bb2956cbbbedb99950f5f0efba |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMTY0OjI0RkJDNToxRjhBQ0IwOjJBQTc0OEY6NkE2NTU1OTkiLCJ2aXNpdG9yX2lkIjoiNDI3NjI1NTgzODk2ODMwNTA0OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 87c1b41cef8279991281e54633f9acfd6b366ec84ef907fb8cdb4af0dedb3f41 |
| hovercard-subject-tag | pull_request:153479037 |
| 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/9814/commits/3fdd52728771da94bdc65517e2754a1209518938 |
| twitter:image | https://avatars.githubusercontent.com/u/6495040?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6495040?s=400&v=4 |
| og:image:alt | PR Summary In the documentation 1 figure_enter_event uses LocationEvent. However, previously it just uses the base class Event. This cause some problem when trying to access LocationEvent attribute... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52c76df668885aaff23b50bdca1fa1ea44ac9c1553e888ebc70ff1e4daa4625b |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 309153364422b3c499922d1a2a6404910a58ed8e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width