Skip to content

Commit 97693e8

Browse files
committed
Patched overzealous zero edge-case in ticker
1 parent 7bec3f4 commit 97693e8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/ticker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2666,7 +2666,7 @@ def tick_values(self, vmin, vmax):
26662666
if self.base > 1:
26672667
log_base = math.log(self.base)
26682668
powers = (
2669-
np.where(zero_xs, 0, np.where(xs >= 0, 1, -1)) *
2669+
np.where(zero_xs, 0, np.sign(xs)) *
26702670
np.power(self.base,
26712671
np.where(zero_xs, 0.0,
26722672
np.floor(np.log(np.abs(xs) + zero_xs*1e-6)

0 commit comments

Comments
 (0)