Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Optimize 3D data limits calculation by simplifying direct updates to dataLim#28998
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
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.
@Thierno88 do you mean#28444 instead of#28403? |
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.
This only proposesset_datalim_x/y/z()
and corresponding propertiesdatalim_x/y/z
. I does not show how this is integerated with the current code, i.e. the auto limits, which#28444 is primarily about. I'm not convinced this new API is helping with that (or maybe I'm just not seeing it, because that part is not implemented here).
I'm also a bit sceptical to introduce z-information in the basicArtist
. So far, the main matplotlib code is all 2D and 3D aspects are limited tompl_toolkits.mplot3d
.
This pull request addresses the inefficiency in updating 3D dataLim for plots in Matplotlib by eliminating unnecessary data processing and copying. Instead of creating a new _Bbox3d class, this PR introduces methods to directly compute and update the X, Y, and Z data limits using individual functions for each axis (get_datalim_x, get_datalim_y, get_datalim_z). This simplifies the code and improves performance by reducing the overhead of manipulating large data structures.
The change allows for direct updates of dataLim within the plotting logic, making the process of auto-scaling more efficient. This resolves the same core problem as discussed in issue#28403 but with a different approach, focusing on minimal code changes and improved performance.
PR Checklist:
closesFIX: Autoscale support in add_collection3d for Line3DCollection and Poly3DCollection #28403
New and changed code is tested to ensure accuracy and robustness.