我想在python 2.7中制作一个三维箭袋图。当我从matplotlib站点运行quiver3d_demo.py时,我得到一个类似于以下值的错误:
--------------------------------------------------------------------------
ValueError Traceback (most recent call last)
/Library/Python/2.7/site-packages/ipython-2.0.0_dev-py2.7.egg/IPython/utils/py3compat.pyc in execfile(fname, *where)
202 else:
203 filename = fname
--> 204 __builtin__.execfile(filename, *where)
/Users/loisks/Desktop/quiver3d_demo.py in <module>()
15 np.sin(np.pi * z))
16
---> 17 ax.quiver(x, y, z, u, v, w, length=0.1)
18
19 plt.show()
/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/axes/_axes.pyc in quiver(self, *args, **kw)
3802 if not self._hold:
3803 self.cla()
-> 3804 q = mquiver.Quiver(self, *args, **kw)
3805 self.add_collection(q, False)
3806 self.update_datalim(q.XY)
/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/quiver.pyc in __init__(self, ax, *args, **kw)
395 """
396 self.ax = ax
--> 397 X, Y, U, V, C = _parse_args(*args)
398 self.X = X
399 self.Y = Y
/Library/Python/2.7/site-packages/matplotlib-1.4.x-py2.7-macosx-10.8-intel.egg/matplotlib/quiver.pyc in _parse_args(*args)
357 nr, nc = 1, U.shape[0]
358 else:
--> 359 nr, nc = U.shape
360 if len(args) == 2: # remaining after removing U,V,C
361 X, Y = [np.array(a).ravel() for a in args]
有什么建议吗?它也不是quiver3d_demo.py - 我无法独立制作3D箭袋图。