Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
Artist autolim#28071
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
Artist autolim#28071
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
tacaswell commentedMay 8, 2024
@jayyxiao I'm sorry this got no attention when you opened this (I have been super busy the last month and know some of the other core developers are in a similar situation). I assure you our lack of response is in no way commentary on your work! Giving it a quick skim this seems like it is heading the right direction, however I have one concern. Passing the forartistinself.children:ifnotvisible_onlyor (artist.get_visible()andartist.get_in_autoscale()):limits,to_update=artist._get_limits(self.transData)self.update_datalim(limits,**to_update) Put another way, currently we have too much artist-specific stuff in Axes, but this swings too far the other way and puts too much Axes specific stuff into the Artists. Additionally, being able to get the data limits of an artist is useful for other things (maybe cheaper hit-checking for picker, improving the auto-placement of the legend, etc) so being able to get at this might be useful. |
Uh oh!
There was an error while loading.Please reload this page.
PR summary
Move auto-limit logic inside respective Artists
This will allow for
relimto work withCollections.closes#25139 ._update_*_limits()were moved inside respective Artists. An_in_autoscaleflag was created in base Artist, with setters and getters. This flag can be a bool or tuple, as specified in#15595 . Also,_update_limits()was created inCollection. Thus,relimchecks the_in_autoscaleflag and calls a generic_update_limits(), which now exists inCollection._in_autoscaleis set to True in the Artist constructor. Expansion to a tuple will be done by the setter._in_autoscalecan be set to False when theautolimparameter ofadd_collectionis False.Since I am a new contributor, I hope this can be a starting point. I'm just looking for some feedback.
PR checklist