← 返回章节索引

CHAPTER 07 · 作品已接入

3D 图表

用 scatter3D 在三维空间中展示点云。

3D Scatter Projection
import matplotlib.pyplot as plt

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.scatter(xs, ys, zs, c='#56e6a8', s=30)
plt.show()
mpl3d 工具包3D 图表