From: <js...@us...> - 2010-05-12 14:42:05
|
Revision: 8309 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8309&view=rev Author: jswhit Date: 2010-05-12 14:41:58 +0000 (Wed, 12 May 2010) Log Message: ----------- let continents that fill whole map be filled. 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-05-11 20:23:04 UTC (rev 8308) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2010-05-12 14:41:58 UTC (rev 8309) @@ -1411,19 +1411,22 @@ ya = np.array(y,np.float32) # check to see if all four corners of domain in polygon (if so, # don't draw since it will just fill in the whole map). - delx = 10; dely = 10 - if self.projection in ['cyl']: - delx = 0.1 - dely = 0.1 - test1 = np.fabs(xa-self.urcrnrx) < delx - test2 = np.fabs(xa-self.llcrnrx) < delx - test3 = np.fabs(ya-self.urcrnry) < dely - test4 = np.fabs(ya-self.llcrnry) < dely - hasp1 = np.sum(test1*test3) - hasp2 = np.sum(test2*test3) - hasp4 = np.sum(test2*test4) - hasp3 = np.sum(test1*test4) - if not hasp1 or not hasp2 or not hasp3 or not hasp4: + # ** turn this off for now since it prevents continents that + # fill the whole map from being filled ** + #delx = 10; dely = 10 + #if self.projection in ['cyl']: + # delx = 0.1 + # dely = 0.1 + #test1 = np.fabs(xa-self.urcrnrx) < delx + #test2 = np.fabs(xa-self.llcrnrx) < delx + #test3 = np.fabs(ya-self.urcrnry) < dely + #test4 = np.fabs(ya-self.llcrnry) < dely + #hasp1 = np.sum(test1*test3) + #hasp2 = np.sum(test2*test3) + #hasp4 = np.sum(test2*test4) + #hasp3 = np.sum(test1*test4) + #if not hasp1 or not hasp2 or not hasp3 or not hasp4: + if 1: xy = zip(xa.tolist(),ya.tolist()) if self.coastpolygontypes[npoly] not in [2,4]: poly = Polygon(xy,facecolor=color,edgecolor=color,linewidth=0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |