Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 61a7088

Browse files
committed
TST
1 parent 6773228 commit 61a7088

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3502,7 +3502,7 @@ def set_xscale(self, value, **kwargs):
35023502
Parameters
35033503
----------
35043504
value : {"linear", "log", "symlog", "logit", ...} or `.ScaleBase`
3505-
The axis scale type to apply.
3505+
The axis scale type to apply.
35063506
35073507
**kwargs
35083508
Different keyword arguments are accepted, depending on the scale.

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,7 @@ def _use_auto_colorbar_locator(self):
594594
one. (check is used twice so factored out here...)
595595
"""
596596
contouring = self.boundaries is not None and self.spacing == 'uniform'
597-
return (type(self.norm) in [colors.Normalize, colors.LogNorm] and
598-
not contouring)
597+
return not contouring
599598

600599
def _reset_locator_formatter_scale(self):
601600
"""
@@ -626,7 +625,6 @@ def update_ticks(self):
626625
ax = self.ax
627626
# Get the locator and formatter; defaults to self.locator if not None.
628627
self._get_ticker_locator_formatter()
629-
630628
if self._use_auto_colorbar_locator():
631629
_log.debug('Using auto colorbar locator %r on colorbar',
632630
self.locator)

lib/matplotlib/tests/test_colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def test_SymLogNorm_single_zero():
666666
norm = mcolors.SymLogNorm(1e-5, vmin=-1, vmax=1, base=np.e)
667667
cbar = mcolorbar.ColorbarBase(fig.add_subplot(), norm=norm)
668668
ticks = cbar.get_ticks()
669-
assert sum(ticks == 0) == 1
669+
assert sum(ticks == 0) <= 1
670670
plt.close(fig)
671671

672672

0 commit comments

Comments
 (0)