← 返回章节索引

CHAPTER 07 · 作品已接入

mpl3d 工具包

用 mpl_toolkits 绘制三维线框与曲面。

mpl3d Wireframe
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_wireframe(X, Y, Z)
plt.show()
mpl3d 工具包