Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1f1692

Browse filesBrowse files
committed
Fix #5753. Handle minpos is log scale
Even when not using round_numbers mode
1 parent ff41158 commit b1f1692
Copy full SHA for b1f1692

File tree

Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+8
-8
lines changed

‎lib/matplotlib/ticker.py

Copy file name to clipboardExpand all lines: lib/matplotlib/ticker.py
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1642,17 +1642,17 @@ def view_limits(self, vmin, vmax):
16421642
vmin = b ** (vmax - self.numdecs)
16431643
return vmin, vmax
16441644

1645-
if rcParams['axes.autolimit_mode'] == 'round_numbers':
1646-
minpos = self.axis.get_minpos()
1645+
minpos = self.axis.get_minpos()
16471646

1648-
if minpos <= 0 or not np.isfinite(minpos):
1649-
raise ValueError(
1650-
"Data has no positive values, and therefore can not be "
1651-
"log-scaled.")
1647+
if minpos <= 0 or not np.isfinite(minpos):
1648+
raise ValueError(
1649+
"Data has no positive values, and therefore can not be "
1650+
"log-scaled.")
16521651

1653-
if vmin <= minpos:
1654-
vmin = minpos
1652+
if vmin <= minpos:
1653+
vmin = minpos
16551654

1655+
if rcParams['axes.autolimit_mode'] == 'round_numbers':
16561656
if not is_decade(vmin, self._base):
16571657
vmin = decade_down(vmin, self._base)
16581658
if not is_decade(vmax, self._base):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.