Revision: 5029
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5029&view=rev
Author:   jswhit
Date:     2008-04-04 08:02:48 -0700 (Fri, 04 Apr 2008)

Log Message:
-----------
workaround for problem reported by Rob Hetland
(meridians don't reach edge of very tiny maps)

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

Modified: trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py
===================================================================
--- trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py  2008-04-03 
15:24:20 UTC (rev 5028)
+++ trunk/toolkits/basemap/lib/mpl_toolkits/basemap/basemap.py  2008-04-04 
15:02:48 UTC (rev 5029)
@@ -1587,10 +1587,13 @@
             lats = circ*npy.ones(len(lons),npy.float32)
             x,y = self(lons,lats)
             # remove points outside domain.
-            testx = npy.logical_and(x>=self.xmin-xdelta,x<=self.xmax+xdelta)
+            # leave a little slop around edges (3*xdelta)
+            # don't really know why, but this appears to be needed to 
+            # or lines sometimes don't reach edge of plot.
+            testx = 
npy.logical_and(x>=self.xmin-3*xdelta,x<=self.xmax+3*xdelta)
             x = npy.compress(testx, x)
             y = npy.compress(testx, y)
-            testy = npy.logical_and(y>=self.ymin-ydelta,y<=self.ymax+ydelta)
+            testy = 
npy.logical_and(y>=self.ymin-3*ydelta,y<=self.ymax+3*ydelta)
             x = npy.compress(testy, x)
             y = npy.compress(testy, y)
             lines = []
@@ -1812,10 +1815,13 @@
             lons = merid*npy.ones(len(lats),npy.float32)
             x,y = self(lons,lats)
             # remove points outside domain.
-            testx = npy.logical_and(x>=self.xmin-xdelta,x<=self.xmax+xdelta)
+            # leave a little slop around edges (3*xdelta)
+            # don't really know why, but this appears to be needed to 
+            # or lines sometimes don't reach edge of plot.
+            testx = 
npy.logical_and(x>=self.xmin-3*xdelta,x<=self.xmax+3*xdelta)
             x = npy.compress(testx, x)
             y = npy.compress(testx, y)
-            testy = npy.logical_and(y>=self.ymin-ydelta,y<=self.ymax+ydelta)
+            testy = 
npy.logical_and(y>=self.ymin-3*ydelta,y<=self.ymax+3*ydelta)
             x = npy.compress(testy, x)
             y = npy.compress(testy, y)
             lines = []


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

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to