Revision: 5749
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5749&view=rev
Author: jswhit
Date: 2008-07-12 05:29:16 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
add omerc example
Modified Paths:
--------------
trunk/toolkits/basemap/doc/users/mapsetup.rst
Added Paths:
-----------
trunk/toolkits/basemap/doc/users/figures/omerc.py
trunk/toolkits/basemap/doc/users/omerc.rst
Added: trunk/toolkits/basemap/doc/users/figures/omerc.py
===================================================================
--- trunk/toolkits/basemap/doc/users/figures/omerc.py
(rev 0)
+++ trunk/toolkits/basemap/doc/users/figures/omerc.py 2008-07-12 12:29:16 UTC
(rev 5749)
@@ -0,0 +1,22 @@
+from mpl_toolkits.basemap import Basemap
+import numpy as np
+import matplotlib.pyplot as plt
+# setup oblique mercator basemap.
+# width is width of map projection region in km (xmax-xmin_
+# height is height of map projection region in km (ymax-ymin)
+# lon_0, lat_0 are the central longitude and latitude of the projection.
+# lat_1,lon_1 and lat_2,lon_2 are two pairs of points that define
+# the projection centerline.
+# Map projection coordinates are automatically rotated to true north.
+# To avoid this, set no_rot=True.
+m = Basemap(height=16700000,width=12000000,
+ resolution='l',area_thresh=1000.,projection='omerc',\
+ lon_0=-100,lat_0=15,lon_2=-120,lat_2=65,lon_1=-50,lat_1=-55)
+m.drawcoastlines()
+m.fillcontinents(color='coral',lake_color='aqua')
+# draw parallels and meridians.
+m.drawparallels(np.arange(-80.,81.,20.))
+m.drawmeridians(np.arange(-180.,181.,20.))
+m.drawmapboundary(fill_color='aqua')
+plt.title("Oblique Mercator Projection")
+plt.savefig('omerc.png')
Modified: trunk/toolkits/basemap/doc/users/mapsetup.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-07-11 18:31:04 UTC
(rev 5748)
+++ trunk/toolkits/basemap/doc/users/mapsetup.rst 2008-07-12 12:29:16 UTC
(rev 5749)
@@ -42,4 +42,5 @@
cass.rst
merc.rst
tmerc.rst
+ omerc.rst
mill.rst
Added: trunk/toolkits/basemap/doc/users/omerc.rst
===================================================================
--- trunk/toolkits/basemap/doc/users/omerc.rst (rev 0)
+++ trunk/toolkits/basemap/doc/users/omerc.rst 2008-07-12 12:29:16 UTC (rev
5749)
@@ -0,0 +1,14 @@
+.. _omerc:
+
+Oblique Mercator Projection
+===========================
+
+The oblique aspect of the mercator projection.
+The projection centerline, instead of being a latitude (as in
+the regular mercator projection) or a longitude (as in the
+transverse mercator projection) can be an
+arbitrary great circle (defined by specifying two points).
+
+.. literalinclude:: figures/omerc.py
+
+.. image:: figures/omerc.png
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins