您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

在python-matplotlib中绘制3D多边形

在python-matplotlib中绘制3D多边形

我想您已经快知道了。这是你想要的吗?

from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
import matplotlib.pyplot as plt
fig = plt.figure()
ax = Axes3D(fig)
x = [0,1,1,0]
y = [0,0,1,1]
z = [0,1,0,1]
verts = [list(zip(x,y,z))]
ax.add_collection3d(Poly3DCollection(verts))
plt.show()

替代文字 您可能也对art3d.pathpatch_2d_to_3d感兴趣。

python 2022/1/1 18:39:46 有242人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶