笔记
单击此处 下载完整的示例代码
演示在 3D 中绘制等高线(水平)曲线#
这类似于 2D 中的等高线图,只是曲线绘制在平面上。f(x, y)=c
z=c

from mpl_toolkits.mplot3d import axes3d
import matplotlib.pyplot as plt
from matplotlib import cm
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()