解决方案1 图片保存
参考:https://blog.youkuaiyun.com/qq_45934285/article/details/140237971
使用plt.savefig(“./outputs_zzk/ok”+“.png”) # 保存观看保存图片
from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
mesh = Poly3DCollection(vertices[model.faces], alpha=0.1)
face_color = (1.0, 1.0, 0.9)
edge_color = (0, 0, 0)
mesh.set_edgecolor(edge_color)
mesh.set_facecolor(face_color)
ax.add_collection3d(mesh)
ax.scatter(joints[:, 0], joints[:, 1], joints[:, 2], color='r')
ax.view_init(azim=-90, elev=100) # y轴朝上
if plot_joints:
ax.scatter(joints[:, 0], joints[:, 1], joints[:, 2], alpha=0.1)
plt.show()
plt.savefig("./outputs_zzk/ok"+".png") # 保存观看
plt.close()