8000 Merge pull request #5724 from mdboom/tick-maximum · matplotlib/matplotlib@042ad99 · GitHub
[go: up one dir, main page]

Skip to content

Commit 042ad99

Browse files
committed
Merge pull request #5724 from mdboom/tick-maximum
Set maximum number of bins in ticking
2 parents 308ce5d + 1a2100b commit 042ad99

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
@@ -1434,7 +1434,7 @@ def set_params(self, **kwargs):
14341434
def bin_boundaries(self, vmin, vmax):
14351435
nbins = self._nbins
14361436
if nbins == 'auto':
1437-
nbins = self.axis.get_tick_space()
1437+
nbins = min(self.axis.get_tick_space(), 9)
14381438
scale, offset = scale_range(vmin, vmax, nbins)
14391439
if self._integer:
14401440
scale = max(1, scale)

0 commit comments

Comments
 (0)
0