Skip to content

Commit 58ed609

Browse files
author
Jeff Whitaker
committed
Merge pull request #114 from jswhit/master
fix for issue #113 (meridians cut off in very small tmerc map)
2 parents d6534ee + a104dfb commit 58ed609

File tree

3 files changed

+12
-7
lines changed

3 files changed

+12
-7
lines changed

Changelog

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
since version 1.0.6
2-
-------------------
1+
version 1.0.7 (not yet released)
2+
-------------------------------
3+
* fix drawmeridians so meridians reach edge of plot when map projection region
4+
is *very* small (issue 113).
35
* update pyproj (with fixes to geodesic calculations).
46
* support for rotated pole transormation (projection = 'rotpole').
57
* fix warpimage with projection = 'hammer' (issue 100).

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
else:
4848
basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
4949

50-
__version__ = '1.0.6'
50+
__version__ = '1.0.7'
5151

5252
# module variable that sets the default value for the 'latlon' kwarg.
5353
# can be set to True by user so plotting functions can take lons,lats
@@ -1047,6 +1047,8 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
10471047
self.lonmax = self.urcrnrlon
10481048
else:
10491049
lons, lats = self.makegrid(1001,1001)
1050+
lats = ma.masked_where(lats > 1.e20,lats)
1051+
lons = ma.masked_where(lons > 1.e20,lons)
10501052
self.latmin = lats.min()
10511053
self.latmax = lats.max()
10521054
self.lonmin = lons.min()
@@ -2575,10 +2577,11 @@ def addlon(meridians,madd):
25752577
if xoffset is None:
25762578
xoffset = (self.urcrnrx-self.llcrnrx)/100.
25772579

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

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def checkversion(GEOS_dir):
111111

112112
setup(
113113
name = "basemap",
114-
version = "1.0.6",
114+
version = "1.0.7",
115115
description = "Plot data on map projections with matplotlib",
116116
long_description = """
117117
An add-on toolkit for matplotlib that lets you plot data

0 commit comments

Comments
 (0)