Christopher Barker wrote: > Hi all, > > I've been messing with quiver a bit, and have some confusions:
No, you hit a bug. Thanks for the report and test script. It is fixed in r7103. If you are not running from svn, a workaround may be to specify the angles as an ndarray or masked array with the shape set to (N,1) where N is the number of arrows. I haven't tested it, but based on the changes I made, I think this will work with the version you have. Eric > > according to the docs: > > """ > units: [‘width’ | ‘height’ | ‘dots’ | ‘inches’ | ‘x’ | ‘y’ ] > > arrow units; the arrow dimensions except for length are in > multiples of this unit. > """ > > and yes, when I change units from 'dots' for 'inched', the length of the > arrows do indeed change. > > > """ > angles: [‘uv’ | ‘xy’ | array] > ... Alternatively, arbitrary angles may be specified as an array of > values in degrees, CCW from the x-axis. > """ > > This crashes for me with: > > Traceback (most recent call last): > File "quiver_test.py", line 72, in <module> > plt.draw() > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/pyplot.py", > > line 341, in draw > get_current_fig_manager().canvas.draw() > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_tkagg.py", > > line 215, in draw > FigureCanvasAgg.draw(self) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/backends/backend_agg.py", > > line 279, in draw > self.figure.draw(self.renderer) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/figure.py", > > line 772, in draw > for a in self.axes: a.draw(renderer) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/axes.py", > > line 1601, in draw > a.draw(renderer) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/quiver.py", > > line 425, in draw > verts = self._make_verts(self.U, self.V) > File > "/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib/quiver.py", > > line 484, in _make_verts > theta = ma.asarray(self.angles*np.pi/180.0).filled(0) > TypeError: can't multiply sequence by non-int of type 'float' > > I've enclosed a small test script... > > Thanks, > > -Chris > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Crystal Reports - New Free Runtime and 30 Day Trial > Check out the new simplified licensing option that enables > unlimited royalty-free distribution of the report engine > for externally facing server and web deployment. > http://p.sf.net/sfu/businessobjects > > > ------------------------------------------------------------------------ > > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users