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.
1 parent 6b1ce2a commit 5e48fd8Copy full SHA for 5e48fd8
lib/matplotlib/colors.py
@@ -1228,10 +1228,7 @@ def monochrome(self):
1228
if not self._isinit:
1229
self._init()
1230
1231
- N = len(self._lut) - 3 # disregard over / under / bad
1232
- if N <= 1:
1233
- return True
1234
- return np.all(self._lut[0] == self._lut[1:N])
+ return self.N <=1 or np.all(self._lut[0] == self._lut[1:self.N])
1235
1236
def resampled(self, lutsize):
1237
"""Return a new colormap with *lutsize* entries."""
0 commit comments