Revision: 8983
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8983&view=rev
Author: jswhit
Date: 2011-02-17 04:33:34 +0000 (Thu, 17 Feb 2011)
Log Message:
-----------
include zorder keyword for drawmapscale.
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 2011-02-12 16:10:15 UTC (rev 8982)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2011-02-17 04:33:34 UTC (rev 8983)
@@ -3454,7 +3454,7 @@
def drawmapscale(self,lon,lat,lon0,lat0,length,barstyle='simple',\
units='km',fontsize=9,yoffset=None,labelstyle='simple',\
fontcolor='k',fillcolor1='w',fillcolor2='k',ax=None,\
- format='%d'):
+ format='%d',zorder=None):
"""
Draw a map scale at ``lon,lat`` of length ``length``
representing distance in the map
@@ -3487,6 +3487,7 @@
fillcolor1(2) colors of the alternating filled regions
(default white and black). Only relevant for
'fancy' barstyle.
+ zorder sets the zorder for the map scale.
============== ====================================================
Extra keyword ``ax`` can be used to override the default axis instance.
@@ -3625,6 +3626,8 @@
fontsize=fontsize,color=fontcolor))
else:
raise KeyError("barstyle must be 'simple' or 'fancy'")
+ if zorder is not None:
+ rets = [ret.set_zorder(zorder) for ret in rets]
return rets
def nightshade(self,date,color="k",delta=0.25,alpha=0.5,ax=None,zorder=2):
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|