Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Implement single axis zoom#30554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Conversation
I note that the existing x-/y- modifiers do not really work when using my laptop's touchpad1, but this proposal does work nicely 👍 Footnotes
|
Matlab has similar behavior. Could implement something similar where the lines at the edge indicate the region the mouse needs to be in? Screen.Recording.2025-09-14.at.19.18.48.mov |
timhoffm commentedSep 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The range marker is a good visualization to indicate the difference. Though, I would like to additionally keep dashed lines as an extension of the whiskers, because that helps to ensure relevant data points are included. That said, all the visual changes would need refactoring and backend-dependent implementation as currently all visualization is done via
|
lucasgruwez commentedSep 14, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Backends so far
|
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
…plotlib into feature/single-axis-zoom
All backends have been updated. As previously mentioned, I was unable to test gtk on my machine, but I have tested all other backends. Several other fixes were also included:
|
Could you move them out into a separate PR? It makes reviewing this PR simpler if we don't have multiple topics. This PR is a good prove-of-concept and from a first glance feature complete - thanks for implementing all the backends! We still need to think about the architecture and how to bring it into the main library. As is, the
|
The bugfixes have been separated into#30560 Regarding third-party backends, I don't fully understand how these would break. The empty
Attempting to use the ![]() |
Tested with
|
lucasgruwez commentedSep 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Having a more thorough read of the issues you've linked, I think we can consider the following implementation: A I see that this could have some ramifications on third party backends, as it could break |
native backends could partially misalign, i.e. an intenal backend doesn't have to be on the newest version of the API, but of course it must have a version that is supported, i.e. if at some point matplotlib supports backend versions v1 and v2, then every internal backend must be one of these versions. For example it would be permissible if we don't implement a new API for all backends right away. |
For the time being, I would leave |
PR summary
Tangent to#30541
Allows for zooming in a single axis using the zoom rectangle by dragging only in one direction.
Screen.Recording.2025-09-14.at.01.37.29.mov
PR checklist