Note

Go to the endto download the full example code.

3D wireframe plots in one direction#

Demonstrates that settingrstride orcstride to 0 causes wires to not begenerated in the corresponding direction.

importmatplotlib.pyplotaspltfrommpl_toolkits.mplot3dimportaxes3dfig,(ax1,ax2)=plt.subplots(2,1,figsize=(8,12),subplot_kw={'projection':'3d'})# Get the test dataX,Y,Z=axes3d.get_test_data(0.05)# Give the first plot only wireframes of the type y = cax1.plot_wireframe(X,Y,Z,rstride=10,cstride=0)ax1.set_title("Column (x) stride set to 0")# Give the second plot only wireframes of the type x = cax2.plot_wireframe(X,Y,Z,rstride=0,cstride=10)ax2.set_title("Row (y) stride set to 0")plt.tight_layout()plt.show()
Column (x) stride set to 0, Row (y) stride set to 0

Tags:plot-type: 3Dlevel: intermediate

Total running time of the script: (0 minutes 1.817 seconds)

Gallery generated by Sphinx-Gallery