Title: Add zoom_factory to matplotlib - where to put? · Issue #18159 · matplotlib/matplotlib · GitHub
Open Graph Title: Add zoom_factory to matplotlib - where to put? · Issue #18159 · matplotlib/matplotlib
X Title: Add zoom_factory to matplotlib - where to put? · Issue #18159 · matplotlib/matplotlib
Description: @tacaswell wrote a zoom_factory function that enables zooming with the mouse scroll wheel in this gist: https://gist.github.com/tacaswell/3144287 this is very useful and would be great if it was offered as a utility function by matplotli...
Open Graph Description: @tacaswell wrote a zoom_factory function that enables zooming with the mouse scroll wheel in this gist: https://gist.github.com/tacaswell/3144287 this is very useful and would be great if it was of...
X Description: @tacaswell wrote a zoom_factory function that enables zooming with the mouse scroll wheel in this gist: https://gist.github.com/tacaswell/3144287 this is very useful and would be great if it was of...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/18159
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add zoom_factory to matplotlib - where to put?","articleBody":"\u003c!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--\u003e\r\n\u003c!--You can feel free to delete the sections that do not apply.--\u003e\r\n\r\n@tacaswell wrote a `zoom_factory` function that enables zooming with the mouse scroll wheel in this gist: https://gist.github.com/tacaswell/3144287 this is very useful and would be great if it was offered as a utility function by matplotlib. In https://github.com/ianhi/ipympl-interactions/pull/21#issuecomment-665743059 tacaswell wrote:\r\n\u003e I am :+1: on a PR to core Matplotlib to add that factory (not sure where) as it is useful in all backends (not just ipympl).\r\n\r\nSo this issue is to discuss whether/where to incorporate the `zoom_factory` function. Two initial suggestions:\r\n1. in the toolbar\r\n2. in pyplot\r\n - Architecturally I don't think this makes as much sense but as a user I don't think I would expect to look at the toolbar for utility methods\r\n\r\nAdditionally I forked that gist (https://gist.github.com/ianhi/b638e09fa7a00764ea539940a0519af9) and added two things:\r\n1. push initial position to toolbar navstack so the home button works as expected\r\n2. automatic centering when zoomed out past initial bounds\r\n - This could be made optional\r\n\r\n if this were to be incorporated in matplotlib it would be nice to have those features as well. \r\n\r\nHere is a gif of this with with some extra code to allow middle click to pan(https://gist.github.com/ianhi/5f514c31f13cc28fbd167849867122b7):\r\n\u003cimg src=https://raw.githubusercontent.com/ianhi/ipympl-interactions/d423ac6b13a7f4565d2bac0f11701df5afaa3d5a/docs/images/zoom-and-pan.gif\u003e\r\n\r\n","author":{"url":"https://github.com/ianhi","@type":"Person","name":"ianhi"},"datePublished":"2020-08-03T14:45:44.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/18159/matplotlib/issues/18159"}
| 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:fc2e2b81-3bd7-9f26-028a-b1cb8c559a11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C05E:2D3512:5B288B:798071:6A526943 |
| html-safe-nonce | dab700f34bc467233243f7ecb8782bbf3a437aeb8e016dd9c2674178c1711812 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDVFOjJEMzUxMjo1QjI4OEI6Nzk4MDcxOjZBNTI2OTQzIiwidmlzaXRvcl9pZCI6IjE0MDE1MjY1MDU2Nzk1MTM5MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | f6be3914b9450cc9a2243694bad15ccc25ac3c1d62404fa393f47d6bcf3303f7 |
| hovercard-subject-tag | issue:672128892 |
| 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/18159/issue_layout |
| twitter:image | https://opengraph.githubassets.com/69706a6e45ff5337b465be13ba568150eda781fb59872adda8848bb97b144064/matplotlib/matplotlib/issues/18159 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/69706a6e45ff5337b465be13ba568150eda781fb59872adda8848bb97b144064/matplotlib/matplotlib/issues/18159 |
| og:image:alt | @tacaswell wrote a zoom_factory function that enables zooming with the mouse scroll wheel in this gist: https://gist.github.com/tacaswell/3144287 this is very useful and would be great if it was of... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ianhi |
| 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