-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[ENH]: generalize artists opting in-to auto limits #25139
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
A major difficulty is that many of our Artists may be anchored in data co-ordinates, but their bounding boxes are not in data-coordinates. |
True, but now we can stuff that complexity back to the |
See #15595, which I had tried to push for during a sprint. |
oh, nice that even has some good discussion over the tricky parts of the API (that I participated in and have no memory of 😞 )! |
Problem
This is triggered by #25127 most recently, but this is a discussion we have had a couple of times.
The core of the problem is that users have different expectations about what things will automatically adjust the axes limits (or not) in autolim mode. Currently
Lines
,Patches
andAxesImage
obligatorily participatematplotlib/lib/matplotlib/axes/_base.py
Lines 2459 to 2483 in a046ee3
matplotlib/lib/matplotlib/axes/_base.py
Lines 2260 to 2273 in a046ee3
Proposed solution
The proposed solution is to:
_update_line_limits
and friends to the respective ArtistsArtist
(probably defaulting to failure)Artist
relim
look at the flag and call the newly generalized method above on any artists that opt-inThis will involved a little bit of public API (how to set the state to opt-in) and a bunch of private API (what should the signature of the method be).
The text was updated successfully, but these errors were encountered: