Christopher Barker wrote: > Christopher Barker wrote: >>> 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. >> Yes, that seems to work. Thanks! > > However, I'm a bit confused now -- if I specify the angles explicitly, > how do I specify the lengths of the arrows? The docs aren't clear on > this point: > > *angles*: ['uv' | 'xy' | array] > With the default 'uv', the arrow aspect ratio is 1, so that > if *U*==*V* the angle of the arrow on the plot is 45 degrees > CCW from the *x*-axis. > With 'xy', the arrow points from (x,y) to (x+u, y+v). > Alternatively, arbitrary angles may be specified as an array > of values in degrees, CCW from the *x*-axis. > > does it use sqrt(x^2+y^2) as the length?
no, it is always sqrt(u^2+v^2), which then gets scaled according to the "units" setting together with the "scale" setting. > > Also: > > *units*: ['width' | 'height' | 'dots' | 'inches' | 'x' | 'y' ] > arrow units; the arrow dimensions *except for length* are in > multiples of this unit. > > * 'x' or 'y': *X* or *Y* data units > > The arrows scale differently depending on the units. For > 'x' or 'y', the arrows get larger as one zooms in; > > which makes it sound like when you set "units" to 'x' or 'y' that the > length does get set to those units... Correct. > > What I'd like to be able to do is set the angles with "angles" and set > the length in y units, but i can't figure out how to do that. quiver(times, np.zeros((len(times),)), lengths, np.zeros(len(lengths)), angles=angles, units='y', scale=scale) Something like that should do it. I am assuming you are plotting time series. Of course, lengths and times must be the same length (where I am assuming they are 1-D). I'm also assuming your data are coming as lengths and angles, not as components. Eric > > 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