-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: size and color rendering for Path3DCollection #19812
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
Conversation
Looks like a real doc-build failure.... :-(
|
No, I jumped to conclusion, but it is an easy fix. Running a full docs build locally before pushing. |
I think you're running into the same issue as #18932 did, namely that legend copies the class, and so creates a 3D collection for its legend handle, without doing any of the 3D work. |
I think this is slightly different, the problem is it is actually creating a the 3D class, rather than the slightly-upsetting matplotlib/lib/mpl_toolkits/mplot3d/art3d.py Lines 705 to 728 in bba76b8
__init__ which bounced to the super class which tries to set the linewidth before setup the 3D stuff.
|
Going to make an executive decision and say that @QuLogic can merge this on one review so we can get 3.4.1 out. |
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.
I have minor comments, and I'll leave this open for a little bit in case anyone else is able to review.
This fixes matplotlib#19787 This modifies the way we manage internal depth sorting of elements in the 3D collections. We need to both preserve the original order (so we can keep the position, size, colour, ... in sync), but present each of them to the 2D rendering code in depth order (back to front). In some cases we can handle this by sorting the values in the getter methods and in others we have to keep a cache of both the sorted (the names used by the 2D code) and unsorted (post-fixed with 3d) data. It does not appear that Line3DCollection does any of the z-sorting that the other collections do. While definitely a limitation and produces MC Escher effects, this is out of scope of the current work. The z-sorting on Poly3DCollection is significantly more sophisticated than the sorting on Path3DCollection and Patch3DCollection so it is handled differently. Co-authored-by: Elliott Sales de Andrade <[email protected]>
5a6411d
to
f888285
Compare
Backport PR #19812: FIX: size and color rendering for Path3DCollection
PR Summary
This fixes both bugs identified in #19787
Still needs test and the tactic should be expanded to the other *Collections before we merge.