I have a plot consisting of a blue surface (plotted via plot_surface
) and a red sphere (plotted via scatter
). The zorder of the surface is set to 0, and the zorder of the sphere is set to 1 (though not setting any zorder values yields the same results).
You can see that the red sphere is to the left of the surface:
As I rotate the plot you can see the red sphere start to disappear behind the blue surface even though it's in front of it:
Until the red sphere completely disappears:
What is strange is that for certain angles/views the red sphere re-appears and is visible again, such as this one:
What's going on here? I've read some of the other plotting/zorder related issues but I haven't seen this type of behavior where one object is clearly behind/in-front of another and it isn't displayed correctly for most viewing angles.
If I make the blue surface transparent, you can see the red sphere behind the surface when it disappears in the plots below (so it seems like the plotting library actually thinks that it's behind the surface).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…