|
From: <js...@us...> - 2009-01-06 16:38:50
|
Revision: 6740
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6740&view=rev
Author: jswhit
Date: 2009-01-06 16:38:47 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
add fulldisk aeqd example.
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/aeqd.rst
Added Paths:
-----------
trunk/toolkits/basemap/doc/users/figures/aeqd_fulldisk.py
Modified: trunk/toolkits/basemap/doc/users/aeqd.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/aeqd.rst 2009-01-06 08:07:18 UTC (rev 6739)
+++ trunk/toolkits/basemap/doc/users/aeqd.rst 2009-01-06 16:38:47 UTC (rev 6740)
@@ -10,6 +10,15 @@
this point are equidistant on the surface of the earth on this projection.
The specified point ``lon_0, lat_0`` shows up as a black dot in the center of the map.
+Here's an example using the width and height keywords to specify the map region.
+
.. literalinclude:: figures/aeqd.py
.. image:: figures/aeqd.png
+
+If both the width/height and corner lat/lon keywords are omitted, the whole world is
+plotted in a circle.
+
+.. literalinclude:: figures/aeqd_fulldisk.py
+
+.. image:: figures/aeqd_fulldisk.png
Added: trunk/toolkits/basemap/doc/users/figures/aeqd_fulldisk.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/aeqd_fulldisk.py (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/aeqd_fulldisk.py 2009-01-06 16:38:47 UTC (rev 6740)
@@ -0,0 +1,19 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+lon_0 = -105; lat_0 = 40
+m = Basemap(projection='aeqd',lat_0=lat_0,lon_0=lon_0)
+# fill background.
+m.drawmapboundary(fill_color='aqua')
+# draw coasts and fill continents.
+m.drawcoastlines(linewidth=0.5)
+m.fillcontinents(color='coral',lake_color='aqua')
+# 20 degree graticule.
+m.drawparallels(np.arange(-80,81,20))
+m.drawmeridians(np.arange(-180,180,20))
+# draw a black dot at the center.
+xpt, ypt = m(lon_0, lat_0)
+m.plot([xpt],[ypt],'ko')
+# draw the title.
+plt.title('Whole World Azimuthal Equidistant Projection')
+plt.savefig('aeqd_fulldisk.png')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|