Note

Go to the endto download the full example code.

Plot contour (level) curves in 3D using the extend3d option#

This modification of thePlot contour (level) curves in 3D example usesextend3d=True toextend the curves vertically into 'ribbons'.

importmatplotlib.pyplotaspltfrommpl_toolkits.mplot3dimportaxes3dax=plt.figure().add_subplot(projection='3d')X,Y,Z=axes3d.get_test_data(0.05)ax.contour(X,Y,Z,extend3d=True,cmap="coolwarm")plt.show()
contour3d 2

Tags:plot-type: 3Dlevel: beginner

Gallery generated by Sphinx-Gallery