Revision: 6508
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6508&view=rev
Author:   jswhit
Date:     2008-12-08 12:52:29 +0000 (Mon, 08 Dec 2008)

Log Message:
-----------
lat_ts now defaults to 0 for mercator.

Modified Paths:
--------------
    trunk/toolkits/basemap/Changelog
    trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py

Modified: trunk/toolkits/basemap/Changelog
===================================================================
--- trunk/toolkits/basemap/Changelog    2008-12-08 12:44:41 UTC (rev 6507)
+++ trunk/toolkits/basemap/Changelog    2008-12-08 12:52:29 UTC (rev 6508)
@@ -1,4 +1,5 @@
 version 0.99.2 (not yet released)
+           * Made lat_ts default to 0 for mercator.
            * Now can specify just lon_0 for all cylindrical projections
              (to produce global map centered on lon_0).
            * Added save_background.py example, showing how to re-use

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-08 
12:44:41 UTC (rev 6507)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/__init__.py 2008-12-08 
12:52:29 UTC (rev 6508)
@@ -261,9 +261,10 @@
  ================ ====================================================
  Keyword          Description
  ================ ====================================================
- lat_ts           latitude of true scale.
-                  optional for stereographic projection.
-                  mandatory for mercator projection.
+ lat_ts           latitude of true scale. Optional for stereographic
+                  and mercator projections.
+                  default is lat_0 for stereographic projection.
+                  default is 0 for mercator projection.
  lat_1            first standard parallel for lambert conformal, 
                   albers equal area and equidistant conic.
                   Latitude of one of the two points on the projection 
@@ -285,7 +286,7 @@
                   not be rotated to true North.  Default is False
                   (projection coordinates are automatically rotated).
  lat_0            central latitude (y-axis origin) - used by all 
-                  projections, Must be equator for mercator projection.
+                  projections. 
  lon_0            central meridian (x-axis origin) - used by all
                   projections.
  boundinglat      bounding latitude for pole-centered projections
@@ -624,6 +625,10 @@
                 self.llcrnrlon = llcrnrlon; self.llcrnrlat = llcrnrlat
                 self.urcrnrlon = urcrnrlon; self.urcrnrlat = urcrnrlat
         elif projection in _cylproj:
+            if projection == 'merc':
+                if lat_ts is None: 
+                    lat_ts = 0.
+                    projparams['lat_ts']=lat_ts
             if not using_corners:
                 llcrnrlat = -90.
                 urcrnrlat = 90.
@@ -634,8 +639,7 @@
                     llcrnrlon = -180.
                     urcrnrlon = 180
                 if projection == 'merc':
-                    if lat_ts is None:
-                        raise ValueError, 'must specify lat_ts for Mercator 
basemap'
+                    if lat_ts is None: lat_ts = 0.
                     # clip plot region to be within -89.99S to 89.99N
                     # (mercator is singular at poles)
                     if llcrnrlat < -89.99: llcrnrlat = -89.99


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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to