8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 03b1b2b + ba7bc0a commit 893dfa3Copy full SHA for 893dfa3
lib/matplotlib/colorbar.py
@@ -584,10 +584,13 @@ def _ticker(self):
584
formatter.set_data_interval(*intv)
585
586
b = np.array(locator())
587
+ if isinstance(locator, ticker.LogLocator):
588
+ eps = 1e-10
589
+ b = b[(b <= intv[1] * (1 + eps)) & (b >= intv[0] * (1 - eps))]
590
+ else:
591
+ eps = (intv[1] - intv[0]) * 1e-10
592
+ b = b[(b <= intv[1] + eps) & (b >= intv[0] - eps)]
593
ticks = self._locate(b)
- inrange = (ticks > -0.001) & (ticks < 1.001)
- ticks = ticks[inrange]
- b = b[inrange]
594
formatter.set_locs(b)
595
ticklabels = [formatter(t, i) for i, t in enumerate(b)]
596
offset_string = formatter.get_offset()
0 commit comments