Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0cfc45d

Browse files
committed
fix typo in axes_divider.py. use nanmin, nanmax in angle_helper.py (patch by Christoph Gohlke)
svn path=/branches/v0_99_maint/; revision=7393
1 parent 7bd2748 commit 0cfc45d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/mpl_toolkits/axes_grid/angle_helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,14 @@ def __call__(self, transform_xy, x1, y1, x2, y2):
293293
# iron out jumps, but algorithm should be improved.
294294
# Tis is just naive way of doing and my fail for some cases.
295295
if self.lon_cycle is not None:
296-
lon0 = lon.min()
296+
lon0 = np.nanmin(lon)
297297
lon -= 360. * ((lon - lon0) > 180.)
298298
if self.lat_cycle is not None:
299-
lat0 = lat.min()
299+
lat0 = np.nanmin(lat)
300300
lat -= 360. * ((lat - lat0) > 180.)
301301

302-
lon_min, lon_max = lon.min(), lon.max()
303-
lat_min, lat_max = lat.min(), lat.max()
302+
lon_min, lon_max = np.nanmin(lon), np.nanmax(lon)
303+
lat_min, lat_max = np.nanmin(lat), np.nanmax(lat)
304304

305305
lon_min, lon_max, lat_min, lat_max = \
306306
self._adjust_extremes(lon_min, lon_max, lat_min, lat_max)

lib/mpl_toolkits/axes_grid/axes_divider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ def get_axes_locator(self):
544544
def apply_aspect(self, position=None):
545545

546546
if self.get_axes_locator() is None:
547-
self._axes_class.apply_apsect(self, position)
547+
self._axes_class.apply_aspect(self, position)
548548
else:
549549
pos = self.get_axes_locator()(self, self._locator_renderer)
550550
self._axes_class.apply_aspect(self, position=pos)

0 commit comments

Comments
 (0)