Skip to content

Commit d2d77e9

Browse files
authored
Fix: improve log-scale error message wording
1 parent 04243ef commit d2d77e9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/ticker.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2484,8 +2484,7 @@ def tick_values(self, vmin, vmax):
24842484
vmin = self.axis.get_minpos()
24852485

24862486
if vmin <= 0.0 or not np.isfinite(vmin):
2487-
raise ValueError(
2488-
"Data has no positive values, and therefore cannot be log-scaled.")
2487+
raise ValueError("Data cannot be log-scaled because all values are <= 0.")
24892488

24902489
if vmax < vmin:
24912490
vmin, vmax = vmax, vmin

0 commit comments

Comments
 (0)