Hinweis
Gehen Sie zum Ende, um den vollständigen Beispielcode herunterzuladen.
Kontur- (Level-)Kurven in 3D darstellen#
Dies ist wie ein Konturdiagramm in 2D, außer dass die Kurve f(x, y)=c auf der Ebene z=c gezeichnet wird.
import matplotlib.pyplot as plt
from matplotlib import cm
from mpl_toolkits.mplot3d import axes3d
ax = plt.figure().add_subplot(projection='3d')
X, Y, Z = axes3d.get_test_data(0.05)
ax.contour(X, Y, Z, cmap=cm.coolwarm) # Plot contour curves
plt.show()