Revision: 4349
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4349&view=rev
Author: jswhit
Date: 2007-11-17 05:08:05 -0800 (Sat, 17 Nov 2007)
Log Message:
-----------
plot two maps
Modified Paths:
--------------
trunk/toolkits/basemap-testing/examples/geos_demo.py
trunk/toolkits/basemap-testing/examples/ortho_demo.py
Modified: trunk/toolkits/basemap-testing/examples/geos_demo.py
===================================================================
--- trunk/toolkits/basemap-testing/examples/geos_demo.py 2007-11-17
12:55:16 UTC (rev 4348)
+++ trunk/toolkits/basemap-testing/examples/geos_demo.py 2007-11-17
13:08:05 UTC (rev 4349)
@@ -1,9 +1,14 @@
from matplotlib.toolkits.basemap import Basemap
-from pylab import title, show, arange
+from pylab import title, show, arange, figure
+
# create Basemap instance for Geostationary (satellite view) projection.
lon_0 = float(raw_input('enter reference longitude (lon_0):'))
-h = float(raw_input('enter satellite height above equator in meters
(satellite_height):'))
-m =
Basemap(projection='geos',lon_0=lon_0,satellite_height=h,rsphere=(6378137.00,6356752.3142),)
+#h = float(raw_input('enter satellite height above equator in meters
(satellite_height):'))
+h = 35785831.0
+
+# map with land/sea mask plotted
+fig=figure()
+m =
Basemap(projection='geos',lon_0=lon_0,satellite_height=h,rsphere=(6378137.00,6356752.3142),resolution=None)
# plot land-sea mask.
rgba_land = (0,255,0,255) # land green.
rgba_ocean = (0,0,255,255) # ocean blue.
@@ -14,4 +19,17 @@
m.drawmeridians(arange(0.,420.,60.))
m.drawmapboundary()
title('Geostationary Map Centered on Lon=%s, Satellite Height=%s' % (lon_0,h))
+
+# map with continents drawn and filled.
+fig = figure()
+m =
Basemap(projection='geos',lon_0=lon_0,satellite_height=h,rsphere=(6378137.00,6356752.3142),resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral')
+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, Satellite Height=%s' % (lon_0,h))
show()
+show()
Modified: trunk/toolkits/basemap-testing/examples/ortho_demo.py
===================================================================
--- trunk/toolkits/basemap-testing/examples/ortho_demo.py 2007-11-17
12:55:16 UTC (rev 4348)
+++ trunk/toolkits/basemap-testing/examples/ortho_demo.py 2007-11-17
13:08:05 UTC (rev 4349)
@@ -1,9 +1,13 @@
from matplotlib.toolkits.basemap import Basemap
-from pylab import title, show, arange
+from pylab import title, show, arange, figure
+
# create Basemap instance for Orthographic (satellite view) projection.
lon_0 = float(raw_input('enter reference longitude (lon_0):'))
lat_0 = float(raw_input('enter reference latitude (lat_0):'))
-m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0)
+
+# map with land/sea mask plotted
+fig = figure()
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution=None)
# plot land-sea mask.
rgba_land = (0,255,0,255) # land green.
rgba_ocean = (0,0,255,255) # ocean blue.
@@ -14,4 +18,16 @@
m.drawmeridians(arange(0.,420.,60.))
m.drawmapboundary()
title('Orthographic Map Centered on Lon=%s, Lat=%s' % (lon_0,lat_0))
+
+# map with continents drawn and filled.
+fig = figure()
+m = Basemap(projection='ortho',lon_0=lon_0,lat_0=lat_0,resolution='l')
+m.drawcoastlines()
+m.fillcontinents(color='coral')
+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, 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.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins