| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../../gallery/misc/../scales/../mplot3d/contourf3d.html | [Back] [Original] |
Section Navigation
fill_between with transparencyhisttype settingsplt.subplotsfloating_axes featuresNote
Go to the end to download the full example code.
Axes3D.contourf differs from Axes3D.contour in that it creates filled
contours, i.e. a discrete number of colours are used to shade the domain.
This is like a Axes.contourf plot in 2D except that the shaded region
corresponding to the level c is graphed on the plane z=c.
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import axes3d
ax = plt.figure().add_subplot(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.contourf(X, Y, Z, cmap="coolwarm")
plt.show()
[contourf3d]Tags: plot-type: 3D level: beginner
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |