Skip to content
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

[MNT]: Refactor data limit handling #28816

Open
timhoffm opened this issue Sep 13, 2024 · 2 comments
Open

[MNT]: Refactor data limit handling #28816

timhoffm opened this issue Sep 13, 2024 · 2 comments

Comments

@timhoffm
Copy link
Member

Summary

Currently, the approach is calling _AxesBase.update_datalim in the plot factory functions with an array of points (often with an already reduced list [(xmin, ymin), (xmax, ymax)] but not always. The information is ad-hoc generated in the factory function.

Proposed fix

We should switch to pushing the logic for data limit evaluation into the Artists. Then the plot factory functions only query the created Artist for their limits and pass that on.

@anntzer
Copy link
Contributor

anntzer commented Sep 19, 2024

Also related to #28101 (comment) and issues linked therein.

@timhoffm
Copy link
Member Author

Note: We have a mechanism for collections : https://matplotlib.org/devdocs/api/collections_api.html#matplotlib.collections.Collection.get_datalim
And Axes.add_collection will use this depending on the autolim parameter`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants