Skip to content

Commit 1a2100b

Browse files
committed
Set maximum number of bins in ticking
1 parent f0e0822 commit 1a2100b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/ticker.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,7 @@ def set_params(self, **kwargs):
14311431
def bin_boundaries(self, vmin, vmax):
14321432
nbins = self._nbins
14331433
if nbins == 'auto':
1434-
nbins = self.axis.get_tick_space()
1434+
nbins = min(self.axis.get_tick_space(), 9)
14351435
scale, offset = scale_range(vmin, vmax, nbins)
14361436
if self._integer:
14371437
scale = max(1, scale)

0 commit comments

Comments
 (0)