Revision: 4415
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4415&view=rev
Author: jswhit
Date: 2007-11-21 13:35:59 -0800 (Wed, 21 Nov 2007)
Log Message:
-----------
add skeleton scripts
Added Paths:
-----------
trunk/py4science/examples/skel/basemap1_skel.py
trunk/py4science/examples/skel/basemap2_skel.py
Added: trunk/py4science/examples/skel/basemap1_skel.py
===================================================================
--- trunk/py4science/examples/skel/basemap1_skel.py
(rev 0)
+++ trunk/py4science/examples/skel/basemap1_skel.py 2007-11-21 21:35:59 UTC
(rev 4415)
@@ -0,0 +1,27 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying lat/lon values at corners.
+projection = 'lcc' # map projection
+resolution = XX # resolution of boundaries ('c','l','i',or 'h')
+lon_0=XX # longitude of origin of map projection domain.
+lat_0=XX # standard parallel/latitude of origin of map projection domain.
+llcrnrlat, llcrnrlon = XX, XX # lat/lon of lower left corner of map
+urcrnrlat, urcrnrlon = XX, XX # lat/lon of upper right corner of map
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+ llcrnrlat=llcrnrlat,llcrnrlon=llcrnrlon,\
+ urcrnrlat=urcrnrlat,urcrnrlon=urcrnrlon,\
+ resolution=resolution,projection=projection)
+# draw coastlines. Make liness a little thinner than default.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using corner lat/lon values')
+pylab.show()
Added: trunk/py4science/examples/skel/basemap2_skel.py
===================================================================
--- trunk/py4science/examples/skel/basemap2_skel.py
(rev 0)
+++ trunk/py4science/examples/skel/basemap2_skel.py 2007-11-21 21:35:59 UTC
(rev 4415)
@@ -0,0 +1,27 @@
+import pylab, numpy
+from matplotlib.toolkits.basemap import Basemap
+
+# create figure.
+# background color will be used for 'wet' areas.
+fig = pylab.figure()
+fig.add_axes([0.1,0.1,0.8,0.8],axisbg='aqua')
+# create map by specifying width and height in km.
+projection = 'lcc' # map projection
+resolution = XX # resolution of boundaries ('c','l','i',or 'h')
+lon_0=XX # longitude of origin of map projection domain.
+lat_0=XX # standard parallel/latitude of origin of map projection domain.
+width = XX # width of map projecton domain in km.
+height = XX # height of map projection domain in km.
+m = Basemap(lon_0=lon_0,lat_0=lat_0,\
+ width=width,height=height,\
+ resolution=resolution,projection=projection)
+# draw coastlines.
+m.drawcoastlines(linewidth=0.5)
+# fill continents.
+m.fillcontinents(color='coral')
+# draw states and countries.
+m.drawcountries()
+m.drawstates()
+pylab.title('map region specified using width and height')
+pylab.savefig('basemap2.eps')
+pylab.savefig('basemap2.png')
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