[ENH]: generalize artists opting in-to auto limits #25139
Labels
Difficulty: Medium
https://matplotlib.org/devdocs/devel/contribute.html#good-first-issues
New feature
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: