|
From: <js...@us...> - 2008-12-13 14:43:06
|
Revision: 6596
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6596&view=rev
Author: jswhit
Date: 2008-12-13 14:43:02 +0000 (Sat, 13 Dec 2008)
Log Message:
-----------
make sure fillcontinents returns a list of *all* Polygon instances
(not just the last one).
Modified Paths:
--------------
trunk/toolkits/basemap/Changelog
trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog 2008-12-13 06:20:28 UTC (rev 6595)
+++ trunk/toolkits/basemap/Changelog 2008-12-13 14:43:02 UTC (rev 6596)
@@ -1,4 +1,6 @@
version 0.99.3 (not yet released)
+ * fillcontinents was returning just last Polygon instance.
+ Now returns a list of all Polygon instances.
* bluemarble: pass kwargs to imshow, return Image instance.
version 0.99.2 (svn revision 6541)
* fix drawlsmask method so that it works for cylindrical
Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-13 06:20:28 UTC (rev 6595)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-13 14:43:02 UTC (rev 6596)
@@ -1305,6 +1305,7 @@
# get axis background color.
axisbgc = ax.get_axis_bgcolor()
npoly = 0
+ polys = []
for x,y in self.coastpolygons:
xa = np.array(x,np.float32)
ya = np.array(y,np.float32)
@@ -1334,10 +1335,11 @@
if zorder is not None:
poly.set_zorder(zorder)
ax.add_patch(poly)
+ polys.append(poly)
npoly = npoly + 1
# set axes limits to fit map region.
self.set_axes_limits(ax=ax)
- return poly
+ return polys
def drawcoastlines(self,linewidth=1.,color='k',antialiased=1,ax=None,zorder=None):
"""
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|