Revision: 4900
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4900&view=rev
Author: jswhit
Date: 2008年01月26日 05:22:33 -0800 (2008年1月26日)
Log Message:
-----------
add some comments
Modified Paths:
--------------
trunk/toolkits/basemap/examples/geos_demo_3.py
Modified: trunk/toolkits/basemap/examples/geos_demo_3.py
===================================================================
--- trunk/toolkits/basemap/examples/geos_demo_3.py 2008年01月26日 13:17:19 UTC (rev 4899)
+++ trunk/toolkits/basemap/examples/geos_demo_3.py 2008年01月26日 13:22:33 UTC (rev 4900)
@@ -1,14 +1,13 @@
from mpl_toolkits.basemap import Basemap
from pylab import title, show, arange, figure
-# map with continents drawn and filled.
fig = figure()
lon_0=57
+# global geos map
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.
+# plot just upper right quadrant (coordinates determined from global map).
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')
m.fillcontinents(color='coral',lake_color='aqua')
@@ -20,11 +19,12 @@
title('Geostationary Map Centered on Lon=%s' % lon_0)
fig = figure()
-m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=10,resolution=None)
+# global ortho map
+lat_0=10.
+m1 = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,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=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
-print m.projparams
+# plot just upper right quadrant (corners determined from global map).
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution='l',llcrnrx=0.,llcrnry=0.,urcrnrx=m1.urcrnrx/2.,urcrnry=m1.urcrnry/2.)
m.drawcoastlines()
m.drawmapboundary(fill_color='aqua')
m.fillcontinents(color='coral',lake_color='aqua')
@@ -33,6 +33,6 @@
m.drawparallels(arange(-90.,120.,30.))
m.drawmeridians(arange(0.,420.,60.))
m.drawmapboundary()
-title('Orthographic Map Centered on Lon=%s' % lon_0)
+title('Orthographic Map Centered on Lon=%s, Lat=%s' % (lon_0,lat_0))
show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.