Revision: 4898
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4898&view=rev
Author:   jswhit
Date:     2008-01-26 05:09:36 -0800 (Sat, 26 Jan 2008)

Log Message:
-----------
illustrate specifying x,y corners for geos and ortho

Added Paths:
-----------
    trunk/toolkits/basemap/examples/geos_demo_3.py

Added: trunk/toolkits/basemap/examples/geos_demo_3.py
===================================================================
--- trunk/toolkits/basemap/examples/geos_demo_3.py                              
(rev 0)
+++ trunk/toolkits/basemap/examples/geos_demo_3.py      2008-01-26 13:09:36 UTC 
(rev 4898)
@@ -0,0 +1,38 @@
+from mpl_toolkits.basemap import Basemap
+from pylab import title, show, arange, figure
+
+# map with continents drawn and filled.
+fig = figure()
+lon_0=57
+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)
+print m.projparams
+m.drawcoastlines()
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
+m.drawcountries()
+# draw parallels and meridians.
+m.drawparallels(arange(-90.,120.,30.))
+m.drawmeridians(arange(0.,420.,60.))
+m.drawmapboundary()
+title('Geostationary Map Centered on Lon=%s' % lon_0)
+
+fig = figure()
+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)
+print m.projparams
+m.drawcoastlines()
+m.drawmapboundary(fill_color='aqua')
+m.fillcontinents(color='coral',lake_color='aqua')
+m.drawcountries()
+# draw parallels and meridians.
+m.drawparallels(arange(-90.,120.,30.))
+m.drawmeridians(arange(0.,420.,60.))
+m.drawmapboundary()
+title('Orthographic Map Centered on Lon=%s' % lon_0)
+
+show()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to