Skip to content

Commit 2e6f75f

Browse files
author
Jeff Whitaker
committed
fix logic for creating parallels - fixes problem where meridians don't
reach edge of plot for very small map projection regions.
1 parent dd37a9c commit 2e6f75f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2575,10 +2575,11 @@ def addlon(meridians,madd):
25752575
if xoffset is None:
25762576
xoffset = (self.urcrnrx-self.llcrnrx)/100.
25772577

2578+
lats = np.linspace(self.latmin,self.latmax,10001)
25782579
if self.projection not in _cylproj + _pseudocyl:
2579-
lats = np.linspace(-latmax,latmax,10001)
2580-
else:
2581-
lats = np.linspace(-90,90,100001)
2580+
testlat = np.logical_and(lats>-latmax,lats<latmax)
2581+
lats = np.compress(testlat,lats)
2582+
25822583
xdelta = 0.01*(self.xmax-self.xmin)
25832584
ydelta = 0.01*(self.ymax-self.ymin)
25842585
linecolls = {}

0 commit comments

Comments
 (0)