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

Method _set_extremes

lib/matplotlib/colors.py:931–944  ·  view source on GitHub ↗

Set the colors for masked (*bad*) and out-of-range (*under* and *over*) values. Parameters that are None are left unchanged.

(self, bad=None, under=None, over=None)

Source from the content-addressed store, hash-verified

929 return new_cm
930
931 def _set_extremes(self, bad=None, under=None, over=None):
932 """
933 Set the colors for masked (*bad*) and out-of-range (*under* and *over*) values.
934
935 Parameters that are None are left unchanged.
936 """
937 if bad is not None:
938 self._rgba_bad = to_rgba(bad)
939 if under is not None:
940 self._rgba_under = to_rgba(under)
941 if over is not None:
942 self._rgba_over = to_rgba(over)
943 if self._isinit:
944 self._update_lut_extremes()
945
946 def _update_lut_extremes(self):
947 """Ensure than an existing lookup table has the correct extreme values."""

Callers 6

set_badMethod · 0.95
set_underMethod · 0.95
set_overMethod · 0.95
set_extremesMethod · 0.95
with_extremesMethod · 0.80
with_extremesMethod · 0.80

Calls 2

_update_lut_extremesMethod · 0.95
to_rgbaFunction · 0.85

Tested by

no test coverage detected