|
From: <js...@us...> - 2008-07-25 11:57:45
|
Revision: 5871
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5871&view=rev
Author: jswhit
Date: 2008-07-25 11:57:39 +0000 (Fri, 25 Jul 2008)
Log Message:
-----------
update barb_demo comments.
Modified Paths:
--------------
trunk/toolkits/basemap/examples/barb_demo.py
Modified: trunk/toolkits/basemap/examples/barb_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/barb_demo.py 2008-07-25 11:54:44 UTC (rev 5870)
+++ trunk/toolkits/basemap/examples/barb_demo.py 2008-07-25 11:57:39 UTC (rev 5871)
@@ -53,6 +53,8 @@
plt.title('Surface Wind Barbs and Pressure (NH)')
# stereogrpaphic projection (SH).
+# 'flip_barb' flag is automatically set for SH data, so that
+# barbs point toward lower pressure (in both Hemisphere).
m = Basemap(width=10000000,height=10000000,lon_0=-90,lat_0=-45.,lat_ts=-45,
resolution='l',projection='stere')
x,y = m(lons,lats)
@@ -68,7 +70,8 @@
cs1 = m.contour(x,y,p,levs,colors='k',linewidths=0.5)
cs2 = m.contourf(x,y,p,levs)
# plot barbs.
-m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
+nh,sh=m.barbs(xv,yv,udat,vdat,length=6,barbcolor='k',flagcolor='r',linewidth=0.5)
+print dir(nh)
# plot colorbar for pressure
cax = plt.axes([0.875, 0.1, 0.05, 0.8]) # setup colorbar axes.
plt.colorbar(cax=cax) # draw colorbar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|