Skip to content

Commit c80563a

Browse files
committed
FIX
1 parent 907c109 commit c80563a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

lib/matplotlib/colorbar.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,17 +1212,16 @@ def _reset_locator_formatter_scale(self):
12121212
self._minorlocator = None
12131213
self._formatter = None
12141214
self._minorformatter = None
1215-
if (isinstance(self.mappable, contour.ContourSet) and
1216-
isinstance(self.norm, colors.LogNorm)):
1217-
# if contours have lognorm, give them a log scale...
1218-
self._set_scale('log')
1219-
elif (self.boundaries is not None or
1215+
if (self.boundaries is not None or
12201216
isinstance(self.norm, colors.BoundaryNorm)):
12211217
if self.spacing == 'uniform':
12221218
funcs = (self._forward_boundaries, self._inverse_boundaries)
12231219
self._set_scale('function', functions=funcs)
12241220
elif self.spacing == 'proportional':
1225-
self._set_scale('linear')
1221+
if isinstance(self.norm, colors.LogNorm):
1222+
self._set_scale('linear')
1223+
else:
1224+
self._set_scale('log')
12261225
elif getattr(self.norm, '_scale', None):
12271226
# use the norm's scale (if it exists and is not None):
12281227
self._set_scale(self.norm._scale)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy