Revision: 8859
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8859&view=rev
Author: jswhit
Date: 2010-12-29 18:50:10 +0000 (Wed, 29 Dec 2010)
Log Message:
-----------
improve labelling of parallels on pseudo-cylindrical projections (like hammer,
mollweide)
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:36:40 UTC (rev 8858)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-12-29
18:50:10 UTC (rev 8859)
@@ -2010,14 +2010,30 @@
else:
xlab = self.llcrnrx
xlab = xlab-xoffset
- t =
ax.text(xlab,yy[n],latlab,horizontalalignment='right',verticalalignment='center',**kwargs)
+ if self.projection in _pseudocyl:
+ if lat>0:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='right',verticalalignment='bottom',**kwargs)
+ elif lat<0:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='right',verticalalignment='top',**kwargs)
+ else:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='right',verticalalignment='center',**kwargs)
+ else:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='right',verticalalignment='center',**kwargs)
elif side == 'r':
if self.projection in _pseudocyl:
xlab,ylab = self(lon_0+179.9,lat)
else:
xlab = self.urcrnrx
xlab = xlab+xoffset
- t =
ax.text(xlab,yy[n],latlab,horizontalalignment='left',verticalalignment='center',**kwargs)
+ if self.projection in _pseudocyl:
+ if lat>0:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='left',verticalalignment='bottom',**kwargs)
+ elif lat<0:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='left',verticalalignment='top',**kwargs)
+ else:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='left',verticalalignment='center',**kwargs)
+ else:
+
t=ax.text(xlab,yy[n],latlab,horizontalalignment='left',verticalalignment='center',**kwargs)
elif side == 'b':
t =
ax.text(xx[n],self.llcrnry-yoffset,latlab,horizontalalignment='center',verticalalignment='top',**kwargs)
else:
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins