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

Skip to content

Commit 87b8ae7

Browse files
committed
FIX
1 parent 1e8658d commit 87b8ae7

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/matplotlib/colorbar.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -996,13 +996,6 @@ def _inverse_boundaries(self, x):
996996
b = self._boundaries
997997
return np.interp(x, np.linspace(0, b[-1], len(b)), b)
998998

999-
def _forward_from_norm(self, x):
1000-
y = self.norm(x)
1001-
return y
1002-
1003-
def _inverse_from_norm(self, x):
1004-
return self.norm.inverse(x)
1005-
1006999
def _reset_locator_formatter_scale(self):
10071000
"""
10081001
Reset the locator et al to defaults. Any user-hardcoded changes
@@ -1037,7 +1030,7 @@ def _reset_locator_formatter_scale(self):
10371030
else:
10381031
# norm._scale is None or not an attr: derive the scale from
10391032
# the Norm:
1040-
funcs = (self._forward_from_norm, self._inverse_from_norm)
1033+
funcs = (lambda x: self.norm(x), lambda x: self.norm.inverse(x))
10411034
self.ax.set_xscale('function', functions=funcs)
10421035
self.ax.set_yscale('function', functions=funcs)
10431036
self.__scale = 'function'

0 commit comments

Comments
 (0)