This is the well-known "stacking problem" that mplot3d has. It is caused by the reduction in data from 3d to 2d as the plot is rendered by the layering engine of matplotlib. Each 3d collection is represented by a single depth value, and so in mixed environments, layering can be wrong.
There may be some ways to improve this, but it is an intractable problem due to the design of the core of matplotlib. Until we have an OpenGL backend and some other significant changes to the transforms framework, this can not be completely solved, only mitigated.
Activity
WeatherGod commented on Jun 22, 2011
This is the well-known "stacking problem" that mplot3d has. It is caused by the reduction in data from 3d to 2d as the plot is rendered by the layering engine of matplotlib. Each 3d collection is represented by a single depth value, and so in mixed environments, layering can be wrong.
There may be some ways to improve this, but it is an intractable problem due to the design of the core of matplotlib. Until we have an OpenGL backend and some other significant changes to the transforms framework, this can not be completely solved, only mitigated.
* removed stacked 3d bar charts
timhoffm commented on Jan 9, 2022
See also #13580.