【发布时间】:2018-09-06 11:37:44
【问题描述】:
如果存在 x、y 和 z 坐标数组。我不是要展示一个静态的二维图,它可以由
绘制plot(x, y)
我是说
import matplotlib as mpl
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.gca(projection='3d')
ax.plot(x, y, z, label='parametric curve')
plt.show()
哪个 matplotlib 函数可以将视图更改为侧视图?这样我就可以为 matplotlib GUI 添加按钮,当用户单击时,3d 图将绘制为顶视图/左视图/...,用户仍然可以使用鼠标以 3d 方式旋转图稍后,就像我们在 CAD 软件中可以做的那样。
谢谢
【问题讨论】:
标签: python matplotlib projection