|
From: <ef...@us...> - 2009-09-05 18:55:18
|
Revision: 7637
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7637&view=rev
Author: efiring
Date: 2009-09-05 18:55:08 +0000 (Sat, 05 Sep 2009)
Log Message:
-----------
Fix bug related to autoscaling and masked values in quiver
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/quiver.py
Modified: trunk/matplotlib/lib/matplotlib/quiver.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/quiver.py 2009-09-04 20:20:06 UTC (rev 7636)
+++ trunk/matplotlib/lib/matplotlib/quiver.py 2009-09-05 18:55:08 UTC (rev 7637)
@@ -498,7 +498,11 @@
a = np.absolute(uv)
if self.scale is None:
sn = max(10, math.sqrt(self.N))
- scale = 1.8 * a[~self.Umask].mean() * sn / self.span # crude auto-scaling
+ if self.Umask is not ma.nomask:
+ amean = a[~self.Umask].mean()
+ else:
+ amean = a.mean()
+ scale = 1.8 * amean * sn / self.span # crude auto-scaling
self.scale = scale
length = a/(self.scale*self.width)
X, Y = self._h_arrows(length)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|