Matplotlib 3D story issue

I have a plot consisting of a blue surface (plotted through plot_surface) and a red sphere (plotted through scatter). The surface zorder is set to 0, and the sphere zorder is set to 1 (although not setting any zorder values ​​gives the same results).

You can see that the red sphere is to the left of the surface: enter image description here

When I turn the graph, you can see how the red sphere begins to disappear behind the blue surface , although it is in front of it :

enter image description here

Until the red sphere disappears completely: enter image description here

It is strange that at certain angles / views the red sphere reappears and is visible again, for example, this: enter image description here

? , /zorder, , / , .

, , ( , , ).

+4
1

Matplotlib 1.5.3 (2016). , @tacaswell ( Matplotlib dev) 3D- Mayavi, Python, Matplotlib , (Pandas, Seaborn, ggplot).

Mayavi OSX , Homebrew pip.

#/bin/bash
# vtk is a mayavi requirement
brew install vtk
pip install mayavi
# Port your matplotlib code to mayavi
# Profit...
0

Source: https://habr.com/ru/post/1537310/


All Articles