使用 extend3d 选项绘制 3D 轮廓(水平)曲线#

这个 绘制 3D 轮廓(水平)曲线 示例的修改版本使用 extend3d=True 将曲线垂直延伸到"带状".

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, extend3d=True, cmap=cm.coolwarm)

plt.show()
contour3d 2

标签: plot-type: 3D level: beginner

Gallery generated by Sphinx-Gallery