From: <js...@us...> - 2008-01-26 13:17:22
|
Revision: 4899 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4899&view=rev Author: jswhit Date: 2008-01-26 05:17:19 -0800 (Sat, 26 Jan 2008) Log Message: ----------- adjust geos and ortho corner specification. Modified Paths: -------------- trunk/toolkits/basemap/examples/geos_demo_3.py trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py Modified: trunk/toolkits/basemap/examples/geos_demo_3.py =================================================================== --- trunk/toolkits/basemap/examples/geos_demo_3.py 2008-01-26 13:09:36 UTC (rev 4898) +++ trunk/toolkits/basemap/examples/geos_demo_3.py 2008-01-26 13:17:19 UTC (rev 4899) @@ -7,7 +7,7 @@ m1 = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution=None) ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k') # plot just upper right quadrant. -m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry) +m = Basemap(projection='geos',lon_0=lon_0,rsphere=(6378137.00,6356752.3142),resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.) print m.projparams m.drawcoastlines() m.drawmapboundary(fill_color='aqua') @@ -23,7 +23,7 @@ m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution=None) ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k') # plot just upper right quadrant. -m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=m1.urcrnrx/2.,llcrnry=m1.urcrnry/2.,urcrnrx=m1.urcrnrx,urcrnry=m1.urcrnry) +m = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.) print m.projparams m.drawcoastlines() m.drawmapboundary(fill_color='aqua') Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py =================================================================== --- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py 2008-01-26 13:09:36 UTC (rev 4898) +++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py 2008-01-26 13:17:19 UTC (rev 4899) @@ -145,8 +145,9 @@ corners or width and height must be specified by the user. For 'ortho' and 'geos', the lat/lon values of the corners may be specified, or the x/y values of the corners (llcrnrx,llcrnry,urcrnrx,urcrnry) in the - coordinate system of the global projection. If the corners are not - specified, the entire globe is plotted. + coordinate system of the global projection (with x=0,y=0 at the center + of the global projection). If the corners are not specified, + the entire globe is plotted. resolution - resolution of boundary database to use. Can be 'c' (crude), 'l' (low), 'i' (intermediate), 'h' (high), 'f' (full) or None. @@ -612,10 +613,10 @@ self.aspect = (proj.ymax-proj.ymin)/(proj.xmax-proj.xmin) if projection in ['geos','ortho'] and \ None not in [llcrnrx,llcrnry,urcrnrx,urcrnry]: - self.llcrnrx = llcrnrx - self.llcrnry = llcrnry - self.urcrnrx = urcrnrx - self.urcrnry = urcrnry + self.llcrnrx = llcrnrx+0.5*proj.xmax + self.llcrnry = llcrnry+0.5*proj.ymax + self.urcrnrx = urcrnrx+0.5*proj.xmax + self.urcrnry = urcrnry+0.5*proj.ymax self._fulldisk = False else: self.llcrnrx = proj.llcrnrx This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |