Skip to content

Commit f82fc3b

Browse files
committed
Merge pull request #6375 from tacaswell/api_cb_default_locator
API: default locator on colorbars to AutoLocator
2 parents dc6f462 + 88f495b commit f82fc3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/colorbar.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,10 @@ def _ticker(self):
576576
elif isinstance(self.norm, colors.LogNorm):
577577
locator = ticker.LogLocator()
578578
else:
579-
locator = ticker.MaxNLocator()
579+
if mpl.rcParams['_internal.classic_mode']:
580+
locator = ticker.MaxNLocator()
581+
else:
582+
locator = ticker.AutoLocator()
580583
else:
581584
b = self._boundaries[self._inside]
582585
locator = ticker.FixedLocator(b, nbins=10)

0 commit comments

Comments
 (0)