Matplotlib 3D颤抖箭头缩放错误?

时间:2018-07-26 19:37:58

标签: python matplotlib 3d

3D matplotlib颤抖箭头似乎缩放奇怪,并且头部角度似乎消失了。这是预期的行为吗?绘制螺旋线及其派生线:

t = np.array([ foo for foo in np.arange(0, 10*pi, 1) ])
x = np.column_stack([np.cos(t/5), np.sin(t/5), t**2])
dx = np.column_stack([-1/5 *np.sin(t/5), 1/5* np.cos(t/5), 2*t] )

fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot(*x.T)
q=ax.quiver( *x.T, *dx.T, arrow_length_ratio=0.01, color='r')
plt.show()

使用arrow_length_ratio=0,我们可以得到箭头杆的合理行为:

No arrowheads

arrow_length_ratio=0.01,我们看到了看起来像轨道的怪异箭头,好像箭头的一半向后倾斜:

Weird arrowheads

默认的arrow_length_ratio给出了一些疯狂的箭头缩放比例:

Insanity

这是所有预期的行为还是错误?

0 个答案:

没有答案