Revision: 4090
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4090&view=rev
Author: jswhit
Date: 2007-11-01 08:17:24 -0700 (Thu, 01 Nov 2007)
Log Message:
-----------
hires boundary example
Added Paths:
-----------
trunk/toolkits/basemap/examples/hires.py
Added: trunk/toolkits/basemap/examples/hires.py
===================================================================
--- trunk/toolkits/basemap/examples/hires.py (rev 0)
+++ trunk/toolkits/basemap/examples/hires.py 2007-11-01 15:17:24 UTC (rev 4090)
@@ -0,0 +1,26 @@
+from matplotlib.toolkits.basemap import Basemap
+from pylab import *
+import time
+
+# create new figure
+fig=figure()
+# create Basemap instance. Use 'high' resolution coastlines.
+t1 = time.clock()
+m = Basemap(llcrnrlon=-11.,llcrnrlat=49.,urcrnrlon=5.,urcrnrlat=59.,
+ resolution='h',projection='tmerc',lon_0=-8.,lat_0=0.)
+print 'time to create instance with high-res boundaries = ',time.clock()-t1
+# draw coastlines and fill continents.
+m.drawcoastlines()
+m.fillcontinents()
+# draw political boundaries.
+m.drawcountries(linewidth=1)
+# draw major rivers.
+m.drawrivers(color='b')
+# draw parallels
+circles = arange(48,65,2).tolist()
+m.drawparallels(circles,labels=[1,1,0,0])
+# draw meridians
+meridians = arange(-12,13,2)
+m.drawmeridians(meridians,labels=[0,0,1,1])
+title("High-Res British Isles",y=1.075)
+show()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|