Note
Go to the endto download the full example code.
plot_trisurf(x, y, z)#
Seeplot_trisurf.

importmatplotlib.pyplotaspltimportnumpyasnpplt.style.use('_mpl-gallery')n_radii=8n_angles=36# Make radii and angles spacesradii=np.linspace(0.125,1.0,n_radii)angles=np.linspace(0,2*np.pi,n_angles,endpoint=False)[...,np.newaxis]# Convert polar (radii, angles) coords to cartesian (x, y) coords.x=np.append(0,(radii*np.cos(angles)).flatten())y=np.append(0,(radii*np.sin(angles)).flatten())z=np.sin(-x*y)# Plotfig,ax=plt.subplots(subplot_kw={'projection':'3d'})ax.plot_trisurf(x,y,z,vmin=z.min()*2,cmap="Blues")ax.set(xticklabels=[],yticklabels=[],zticklabels=[])plt.show()