Eric Firing wrote:
> jason-s...@creativetrax.com wrote:
>> A couple of us are trying to figure out how to scale arrows in a 
>> quiver plot so that we can exactly specify what the output arrows 
>> look like.  For example, we'd like to scale the vectors to half of 
>> their size, and have it look like that on the quiver plot.
>>
>> So I tried even just getting a quiver plot to plot an arrow exactly 
>> as I passed it, without it scaling anything.  My attempt is this:
>>
>> import matplotlib.pylab as plt
>> fig=plt.figure(figsize=[6,6])
>> q=plt.quiver([0],[0],[1],[1],units='x',scale=1,angles='xy')
>
> I have committed a change to svn trunk, so that if you change the
> above to
>
> q = plt.quiver([0],[0], [1], [1], scale_units='xy', angles='xy', scale=1)
>
> it should do exactly what you want.  When scale_units is given, the 
> setting of "units" controls only the specification of the arrow width, 
> so if you are not specifying the width, it doesn't have any effect.
>
> If I could start from scratch, I probably could come up with a better 
> set of kwarg names and defaults; but for reasons of 
> backwards-compatibility, this is what we have.  The new scale_units 
> kwarg makes it much easier to manually set the scale.  Previously (and 
> still with the default of scale_units=None), it was almost hopelessly 
> confusing.
>
> (Maybe I should add "width_units", identical to "units", and deprecate 
> the latter; this might make the meanings of the kwargs clearer.)
>


Thanks!

Jason


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to