为什么会产生错误?夸格支点斧箭导致代码失败,但它在没有kwarg的情况下也能工作。错误消息也不是很有用。我使用的是python3.4和matplotlib 1.4.3。谢谢。在
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = plt.axes(projection='3d')
x=[0,0,4,4]
y=[0,5,5,5]
z=[0,0,0,-2]
ax.plot(x, y, z, '-b', linewidth=5)
ax.view_init(30, 30)
ax.set_xlabel('X')
ax.set_ylabel('Y')
ax.set_zlabel('Z')
X=[0]
Y=[5]
Z=[0]
U=[-60]
V=[40]
W=[20]
ax.quiver3D(X, Y, Z, U, V, W, pivot='tail')
错误信息
^{pr2}$
您需要更新matplotlib。在
从documentation of version 1.5.0(第641页):
在documentation of version 1.4.3(第567页)中也是如此:
这个特性只是在1.4.3中缺失了,这也解释了为什么没有一条信息性的错误消息:
pivot
关键字被传递给LineCollection
,而这对它没有任何意义。在相关问题 更多 >
编程相关推荐