【发布时间】:2016-09-28 01:29:09
【问题描述】:
我在 Python 中有三个数据点 xs、ys、zs 列表,我正在尝试使用 scatter3d 方法创建一个带有 matplotlib 的 3d 图。
import matplotlib.pyplot as plt
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
plt.xlim(290)
plt.ylim(301)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
ax.scatter(xs, ys, zs)
plt.savefig('dateiname.png')
plt.close()
plt.xlim() 和 plt.ylim() 工作正常,但我找不到在 z 方向设置边框的函数。我该怎么做?
【问题讨论】:
标签: matplotlib scatter3d