|
From: <js...@us...> - 2008-06-16 12:04:36
|
Revision: 5553
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5553&view=rev
Author: jswhit
Date: 2008-06-16 05:04:29 -0700 (Mon, 16 Jun 2008)
Log Message:
-----------
added azimuth equidistant example
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/mapsetup.rst
Added Paths:
-----------
trunk/toolkits/basemap/doc/users/azeqd.rst
trunk/toolkits/basemap/doc/users/figures/azeqd.png
trunk/toolkits/basemap/doc/users/figures/azeqd.py
Added: trunk/toolkits/basemap/doc/users/azeqd.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/azeqd.rst (rev 0)
+++ trunk/toolkits/basemap/doc/users/azeqd.rst 2008-06-16 12:04:29 UTC (rev 5553)
@@ -0,0 +1,17 @@
+.. _azeqd:
+
+Azimuthal Equidistant Projection
+================================
+
+The shortest route from the center of the map
+to any other point is a straight line in the azimuthal
+equidistant projection. Such lines show the true scale
+on the earth's surface.
+So, for the specified point, this script draws a map that shows
+in which direction to depart for other points on earth and how far
+it will be to reach that destination.
+The specified point ``lon_0, lat_0`` shows up as a black dot in the center of the map.
+
+.. literalinclude:: figures/azeqd.py
+
+.. image:: figures/azeqd.png
Added: trunk/toolkits/basemap/doc/users/figures/azeqd.png
===================================================================
(Binary files differ)
Property changes on: trunk/toolkits/basemap/doc/users/figures/azeqd.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/toolkits/basemap/doc/users/figures/azeqd.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/azeqd.py (rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/azeqd.py 2008-06-16 12:04:29 UTC (rev 5553)
@@ -0,0 +1,20 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+width = 28000000; lon_0 = -105; lat_0 = 40
+m = Basemap(width=width,height=width,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('Azimuthal Equidistant Projection')
+plt.savefig('azeqd.png')
Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-06-16 00:27:35 UTC (rev 5552)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-06-16 12:04:29 UTC (rev 5553)
@@ -28,4 +28,5 @@
.. toctree::
+ azeqd.rst
ortho.rst
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|