|
From: <js...@us...> - 2010-12-29 18:32:56
|
Revision: 8856
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8856&view=rev
Author: jswhit
Date: 2010-12-29 18:32:50 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
fix labelling of parallels on hammer map.
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 2010-12-29 18:05:38 UTC (rev 8855)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-29 18:32:50 UTC (rev 8856)
@@ -1924,13 +1924,15 @@
if side in ['l','r']:
nmax = int((self.ymax-self.ymin)/dy+1)
yy = np.linspace(self.llcrnry,self.urcrnry,nmax)
- # mollweide inverse transform undefined at South Pole
- if self.projection == 'moll' and yy[0] < 1.e-4:
- yy[0] = 1.e-4
if side == 'l':
- xx = self.llcrnrx*np.ones(yy.shape,yy.dtype)
- lons,lats = self(xx,yy,inverse=True)
- lons = lons.tolist(); lats = lats.tolist()
+ if self.projection in _pseudocyl:
+ lats = np.linspace(-89.99,89,99,nmax)
+ lons = (self.projparams['lon_0']-180.)*np.ones(len(lats),lats.dtype)
+ xx, yy = self(lons, lats)
+ else:
+ xx = self.llcrnrx*np.ones(yy.shape,yy.dtype)
+ lons,lats = self(xx,yy,inverse=True)
+ lons = lons.tolist(); lats = lats.tolist()
else:
lons,lats = self(self.urcrnrx*np.ones(yy.shape,np.float32),yy,inverse=True)
lons = lons.tolist(); lats = lats.tolist()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|