Skip to content

Commit e7b273f

Browse files
author
Jeff Whitaker
committed
Merge pull request #14 from jswhit/master
fix for zooming in on polar orthographic map
2 parents 30835b7 + 2e392ea commit e7b273f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,8 @@ def __init__(self, llcrnrlon=None, llcrnrlat=None,
585585
raise ValueError('orthographic projection only works for perfect spheres - not ellipsoids')
586586
if lat_0 is None or lon_0 is None:
587587
raise ValueError('must specify lat_0 and lon_0 for Orthographic basemap')
588-
if lat_0 == 90 or lat_0 == -90:
588+
if lat_0 == 90 or lat_0 == -90 and\
589+
None in [llcrnrx,llcrnry,urcrnrx,urcrnry]:
589590
# for ortho plot centered on pole, set boundinglat to equator.
590591
# (so meridian labels can be drawn in this special case).
591592
self.boundinglat = 0
@@ -2374,7 +2375,7 @@ def addlon(meridians,madd):
23742375
linecolls[k] = _tup(linecolls[k])
23752376
# override __delitem__ in dict to call remove() on values.
23762377
meridict = _dict(linecolls)
2377-
# clip meridian lines and label them.
2378+
# for round polar plots, clip meridian lines and label them.
23782379
if self.round:
23792380
if self.clipcircle not in ax.patches:
23802381
p = ax.add_patch(self.clipcircle)

0 commit comments

Comments
 (0)