Make Path3DCollection store indexed offset, and only apply z-ordered offset during draw#24491
Make Path3DCollection store indexed offset, and only apply z-ordered offset during draw#24491ksunden merged 1 commit intomatplotlib:mainfrom hukaidong:3dproj
Conversation
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
|
@tacaswell would you mind checking this? |
|
This looks reasonable, but had a few comments. Good use of a context manager. Could you please also add a test as well? |
|
Could you compare this approach to #18932 and why you think this is a better path @hukaidong ? |
Thanks, this does make sense. I'll append a test soon. |
I see quite amount of refraction tries to reduce the amount of method provided in artists class, which is not relevant to this topic. So I put them apart. For the work refractoring do_3d_projection, it saves space from storing offset with a cost re-computing projection transform twice. One in |
|
@tacaswell I'm not sure if this is the best way to test the issue but I've added a test case there. Also a null guard is set in context manager so we won't have to worry about |
And also, in case, I've checked main branch and new test case failed there as excepted. |
|
@tacaswell Looks I'm not able to do the merge. Who should I call for the merging? |
|
@hukaidong just FYI, we do require two approving reviews from core contributors before merging (for changes to library code) which is why @tacaswell did not previously merge this when he first approved it |
Awesome! Thanks for letting me know. |
PR Summary
This PR is targeted to resolve issue #23155 by maintain offset order for indexing purpose. And z-ordered offset will only be applied during rendering peroid.
PR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst