matplotlib.pyplot.quiver绘制巨型箭头,'scale'或'width'作为参数,给出“'Line3DCollection'对象没有属性'units'”

2024-10-05 14:21:23 发布

您现在位置:Python中文网/ 问答频道 /正文

我画了一个图,上面有一个向量的路径和这个向量在给定时间的位置。我在3D中使用quiver,但是当我试图在参数中使用scale或{}时,会出现错误。它画了矢量,但箭头太大了。使箭头指向的两条“边线”太大了。如何使它们小一点? Output Graph

ax = plt.axes(projection='3d')
ax.set_autoscalex_on(True)
ax.scatter3D(x, y, z, s=0.4 ) 
 #x, y and z are arrays with coordinates of points
ax.quiver(0, 0, 0, x[10], y[10], z[10], color='red')
{}s'.format(step)

plt.show()

Tags: 路径参数矢量错误时间plt箭头ax