Skip to content

Commit 5ba5233

Browse files
committed
Merge pull request matplotlib#1277 from bblay/autolev
Fixed bug in MaxNLocator.bin_boundaries
2 parents b90eaa8 + 1e76ab8 commit 5ba5233

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/ticker.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1237,8 +1237,8 @@ def bin_boundaries(self, vmin, vmax):
12371237
scale, offset = scale_range(vmin, vmax, nbins)
12381238
if self._integer:
12391239
scale = max(1, scale)
1240-
vmin -= offset
1241-
vmax -= offset
1240+
vmin = vmin - offset
1241+
vmax = vmax - offset
12421242
raw_step = (vmax-vmin)/nbins
12431243
scaled_raw_step = raw_step/scale
12441244
best_vmax = vmax

0 commit comments

Comments
 (0)