Revision: 5862
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5862&view=rev
Author: jswhit
Date: 2008-07-25 02:40:12 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
flip wind barbs for points in SH according to meterological convention.
Modified Paths:
--------------
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-07-25
01:43:43 UTC (rev 5861)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-07-25
02:40:12 UTC (rev 5862)
@@ -2914,8 +2914,15 @@
h = kwargs.pop('hold',None)
if h is not None:
ax.hold(h)
+ lons, lats = self(x, y, inverse=True)
+ unh = ma.masked_where(lats <= 0, u)
+ vnh = ma.masked_where(lats <= 0, v)
+ ush = ma.masked_where(lats > 0, u)
+ vsh = ma.masked_where(lats > 0, v)
try:
- ret = ax.barbs(x,y,u,v,*args,**kwargs)
+ retnh = ax.barbs(x,y,unh,vnh,*args,**kwargs)
+ kwargs['flip_barb']=True
+ retsh = ax.barbs(x,y,ush,vsh,*args,**kwargs)
try:
plt.draw_if_interactive()
except:
@@ -2926,7 +2933,7 @@
ax.hold(b)
# set axes limits to fit map region.
self.set_axes_limits(ax=ax)
- return ret
+ return retnh,retsh
def drawlsmask(self,rgba_land,rgba_ocean,lsmask=None,
lsmask_lons=None,lsmask_lats=None,lakes=False,**kwargs):
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins