0

I have got a trisurf plot using matplotlib in my Python script. Outside the surface the Z array contains NaN.

    min= np.nanmin(Z)
    max= np.nanmax(Z)
    fig = plt.figure(figsize=(16, 16))
    yAx = fig.add_subplot(1,1,1, projection='3d')
    yAx.set_xlabel(...)
    yAx.set_ylabel(...) 
    yAx.set_zlabel(...)     
    ySurf = yAx.plot_trisurf(X, Y, Z, vmin=min, vmax=max, linewidth=0.1, cmap=plt.cm.jet, alpha=0.5, antialiased=True)
    yAx.set_zlim([min, max])
    fig.tight_layout()

I discovered a bug with the overlapping of the surface: strange overlapping

enter image description here

When I rotate the 3D-plot the surface seems to be displayed correctly: rotated

enter image description here

I can't figure it out, what is wrong here? I'm using matplotlib 1.5.1.

tacaswell
  • 84,579
  • 22
  • 210
  • 199
  • 1
    mpl does not have a z-buffer and draws artist-at-a-time so intersections in 3D get wonky – tacaswell Feb 05 '16 at 21:09
  • See https://stackoverflow.com/questions/14824893/how-to-draw-intersecting-planes/14825951#14825951 – tacaswell Feb 05 '16 at 21:10
  • @tcaswell Even with alpha=1 my surface/surface overlap (I do not mean the isoline/surface overlap) is bugged. When I run the [trisurf demo](http://matplotlib.org/1.2.1/examples/mplot3d/trisurf3d_demo.html) the surface/surface overlap is displayed correctly even with alpha<1.. – DericDesta Feb 07 '16 at 00:04

0 Answers0