FIX: size and color rendering for Path3DCollection#19812
FIX: size and color rendering for Path3DCollection#19812QuLogic merged 1 commit intomatplotlib:masterfrom
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. |
QuLogic
left a comment
There was a problem hiding this comment.
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.