Skip to content

Commit

Permalink
FIX
Browse files Browse the repository at this point in the history
  • Loading branch information
jklymak committed Jul 7, 2022
1 parent 907c109 commit ec8ae4b
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lib/matplotlib/colorbar.py
Expand Up @@ -1212,17 +1212,16 @@ def _reset_locator_formatter_scale(self):
self._minorlocator = None
self._formatter = None
self._minorformatter = None
if (isinstance(self.mappable, contour.ContourSet) and
isinstance(self.norm, colors.LogNorm)):
# if contours have lognorm, give them a log scale...
self._set_scale('log')
elif (self.boundaries is not None or
if (self.boundaries is not None or
isinstance(self.norm, colors.BoundaryNorm)):
if self.spacing == 'uniform':
funcs = (self._forward_boundaries, self._inverse_boundaries)
self._set_scale('function', functions=funcs)
elif self.spacing == 'proportional':
self._set_scale('linear')
if isinstance(self.norm, colors.LogNorm):
self._set_scale('log')
else:
self._set_scale('linear')
elif getattr(self.norm, '_scale', None):
# use the norm's scale (if it exists and is not None):
self._set_scale(self.norm._scale)
Expand Down

0 comments on commit ec8ae4b

Please sign in to comment.