Does the matplotlib
in python 2.x support hidden line removal?
How can I implement it myself?
This is a further question of another post solved here: How to obtain 3D colored surface via Python?
Does the matplotlib
in python 2.x support hidden line removal?
How can I implement it myself?
This is a further question of another post solved here: How to obtain 3D colored surface via Python?
I'm assuming that by "hidden" you mean lines that are behind surface patches in the view, e.g., behind "hills" in the plot.
Use
plot_surface
instead ofplot_wireframe
:I used
to create the first and
to create the second plot.
If you want to combine this with colormapping the edges, you'll have to use some internals. If you use the
cmap
argument to colormap the surface faces, the source code forPoly3DCollection.do_3d_projection
eventually callsto_rgba(self._A)
to calculate face colors. Remap this to edge colors, and you're good to go:produces this plot:
(You might have to call
set_edgecolors
/set_facecolors
again after the first render pass asdo_3d_projection
might override the values; I ran this in interactive mode and have not checked.)