MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / is_gray

Method is_gray

lib/matplotlib/colors.py:984–988  ·  view source on GitHub ↗

Return whether the colormap is grayscale.

(self)

Source from the content-addressed store, hash-verified

982 self._init()
983
984 def is_gray(self):
985 """Return whether the colormap is grayscale."""
986 self._ensure_inited()
987 return (np.all(self._lut[:, 0] == self._lut[:, 1]) and
988 np.all(self._lut[:, 0] == self._lut[:, 2]))
989
990 def resampled(self, lutsize):
991 """Return a new colormap with *lutsize* entries."""

Callers

nothing calls this directly

Calls 1

_ensure_initedMethod · 0.95

Tested by

no test coverage detected