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

Skip to content

Commit 6197326

Browse files
committed
Merged revisions 8749 via svnmerge from
https://matplotlib.svn.sf.net/svnroot/matplotlib/branches/v1_0_maint ........ r8749 | mdboom | 2010-10-12 15:13:09 -0400 (Tue, 12 Oct 2010) | 2 lines Safer handling of the minimum positive value in log locators. ........ svn path=/trunk/matplotlib/; revision=8750
1 parent 9d3fb25 commit 6197326

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/ticker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,7 +1243,7 @@ def __call__(self):
12431243

12441244
if vmin <= 0.0:
12451245
vmin = self.axis.get_minpos()
1246-
if vmin <= 0.0:
1246+
if vmin <= 0.0 or not np.isfinite(vmin):
12471247
raise ValueError(
12481248
"Data has no positive values, and therefore can not be log-scaled.")
12491249

@@ -1296,7 +1296,7 @@ def view_limits(self, vmin, vmax):
12961296

12971297
minpos = self.axis.get_minpos()
12981298

1299-
if minpos<=0:
1299+
if minpos<=0 or not np.isfinite(minpos):
13001300
raise ValueError(
13011301
"Data has no positive values, and therefore can not be log-scaled.")
13021302

0 commit comments

Comments
 (0)