Revision: 8126
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8126&view=rev
Author:   jswhit
Date:     2010-02-11 13:15:28 +0000 (Thu, 11 Feb 2010)

Log Message:
-----------
add limited area plot

Modified Paths:
--------------
    trunk/toolkits/basemap/examples/nsper_demo.py

Modified: trunk/toolkits/basemap/examples/nsper_demo.py
===================================================================
--- trunk/toolkits/basemap/examples/nsper_demo.py       2010-02-11 13:02:50 UTC 
(rev 8125)
+++ trunk/toolkits/basemap/examples/nsper_demo.py       2010-02-11 13:15:28 UTC 
(rev 8126)
@@ -21,5 +21,23 @@
 m.drawmeridians(np.arange(0.,420.,20.))
 m.drawmapboundary()
 plt.title('Near-Sided Perspective Map Centered on Lon=%s, Lat=%s, H=%g' %\
-    (lon_0,lat_0,h),fontsize=10)
+    (lon_0,lat_0,h/1000.),fontsize=10)
+
+fig = plt.figure()
+m1 = 
Basemap(projection='nsper',lon_0=lon_0,lat_0=lat_0,satellite_height=h,resolution=None)
+ax = fig.add_axes([0.1,0.1,0.8,0.8],axisbg='k')
+# plot just upper right quadrant (coordinates determined from global map).
+m = 
Basemap(projection='nsper',lon_0=lon_0,lat_0=lat_0,satellite_height=h,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')
+m.drawcountries()
+m.drawstates()
+# draw parallels and meridians.
+m.drawparallels(np.arange(-90.,120.,30.))
+m.drawmeridians(np.arange(0.,420.,60.))
+m.drawmapboundary()
+plt.title('Near-Sided Perspective Map Centered on Lon=%s, Lat=%s, H=%g' %\
+    (lon_0,lat_0,h/1000.),fontsize=10)
+
 plt.show()


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

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to