Revision: 6724
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6724&view=rev
Author:   jswhit
Date:     2008-12-31 18:49:07 +0000 (Wed, 31 Dec 2008)

Log Message:
-----------
fix bluemarble for full-disk aeqd, update garp.py example.

Modified Paths:
--------------
    trunk/toolkits/basemap/examples/garp.py
    trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py

Modified: trunk/toolkits/basemap/examples/garp.py
===================================================================
--- trunk/toolkits/basemap/examples/garp.py     2008-12-31 17:10:51 UTC (rev 
6723)
+++ trunk/toolkits/basemap/examples/garp.py     2008-12-31 18:49:07 UTC (rev 
6724)
@@ -17,17 +17,38 @@
 location = raw_input('name of location:')
 
 m = Basemap(resolution='c',projection='aeqd',lat_0=lat_0,lon_0=lon_0)
-# fill background.
-m.drawmapboundary(fill_color='aqua')
-# draw coasts and fill continents.
-m.drawcoastlines(linewidth=0.5)
-m.fillcontinents(color='coral',lake_color='aqua')
-# 20 degree graticule.
+
+# draw coastlines and fill continents.
+# **it's easy to make this fail with global aeqd plots.
+#  For example, if the center point is at the North Pole,
+#  the continent filling routines get confused and fills
+#  the outside of Antartica instead of the inside**
+
+#m.drawmapboundary(fill_color='white')
+#m.drawcoastlines(linewidth=0.5)
+#m.fillcontinents(color='black',lake_color='white')
+#m.drawparallels(np.arange(-80,81,20))
+#m.drawmeridians(np.arange(-180,180,20))
+
+# draw lsmask instead of drawing continents (slower, but more robust).
+
+m.drawlsmask(land_color='black',ocean_color='white',lakes=True)
 m.drawparallels(np.arange(-80,81,20))
 m.drawmeridians(np.arange(-180,180,20))
-# draw a black dot at the center.
+m.drawmapboundary()
+
+# blue marble background (pretty, but slow).
+
+#m.bluemarble(scale=0.5)
+#m.drawparallels(np.arange(-80,81,20),color='0.5')
+#m.drawmeridians(np.arange(-180,180,20),color='0.5')
+#m.drawmapboundary(color='0.5')
+
+# draw a red dot at the center.
 xpt, ypt = m(lon_0, lat_0)
-m.plot([xpt],[ypt],'ko') 
+m.plot([xpt],[ypt],'ro') 
+
 # draw the title.
 plt.title('The World According to Garp in '+location)
+
 plt.show()

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-31 
17:10:51 UTC (rev 6723)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-31 
18:49:07 UTC (rev 6724)
@@ -3317,7 +3317,8 @@
                     self.transform_scalar(self._bm_rgba[:,:,k],\
                     self._bm_lons,self._bm_lats,nx,ny,returnxy=True)
                 # for ortho,geos mask pixels outside projection limb.
-                if self.projection in ['geos','ortho']:
+                if self.projection in ['geos','ortho'] or \
+                   (self.projection == 'aeqd' and self._fulldisk):
                     lonsr,latsr = self(x,y,inverse=True)
                     mask = ma.zeros((ny,nx,4),np.int8)
                     mask[:,:,0] = np.logical_or(lonsr>1.e20,latsr>1.e30)


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to