【发布时间】:2015-06-15 08:40:12
【问题描述】:
我正在尝试使用 matplotlib 制作一个简单的 3D 曲面图,但最后没有显示该图;我只得到空的 3D 轴。
这是我所做的:
from mpl_toolkits.mplot3d import Axes3D
x = np.arange(1, 100, 1)
y = np.arange(1, 100, 1)
z = np.arange(1, 100, 1)
fig = figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_surface(x, y, z, rstride=5, cstride=5)
show()
...我明白了:
有什么建议吗?
【问题讨论】:
标签: python matplotlib plot 3d surface