首页 > 解决方案 > 为什么 Python 中的 plot_trisurf 在不同的数据和平台中没有显示任何图?

问题描述

这是我在 python 中的代码:

df = pd.DataFrame({'x':Final_X, 'y': Final_Y, 'z':Final_Z})
fig = plt.figure()
ax = Axes3D(fig)
surf = ax.plot_trisurf(df.x, df.y, df.z, cmap=cm.jet, linewidth=0.1)
fig.colorbar(surf, shrink=0.5, aspect=5)
plt.show()

通常会从图中得到正确的输出,但是当我输入更大的数据时,会在输出中看到类似这样的内容:

<Figure Size 640*480 with 2 Axis>

并且没有显示任何其他内容。有什么帮助吗?

标签: pythonplot

解决方案


这显然是由于某些系统的分辨率。有时由于绘图后发生错误


推荐阅读