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

Method _init_status

lib/matplotlib/widgets.py:1444–1458  ·  view source on GitHub ↗

Initialize properties to match active status. The user may have passed custom colours in *check_props* to the constructor, or to `.set_check_props`, so we need to modify the visibility after getting whatever the user set.

(self, actives)

Source from the content-addressed store, hash-verified

1442 self._observers.process('clicked', self.labels[index].get_text())
1443
1444 def _init_status(self, actives):
1445 """
1446 Initialize properties to match active status.
1447
1448 The user may have passed custom colours in *check_props* to the
1449 constructor, or to `.set_check_props`, so we need to modify the
1450 visibility after getting whatever the user set.
1451 """
1452 self._active_check_colors = self._buttons.get_facecolor()
1453 if len(self._active_check_colors) == 1:
1454 self._active_check_colors = np.repeat(self._active_check_colors,
1455 len(actives), axis=0)
1456 self._buttons.set_facecolor(
1457 [ec if active else "none"
1458 for ec, active in zip(self._active_check_colors, actives)])
1459
1460 def clear(self):
1461 """Uncheck all checkboxes."""

Callers 2

_init_propsMethod · 0.95
set_check_propsMethod · 0.95

Calls 2

get_facecolorMethod · 0.45
set_facecolorMethod · 0.45

Tested by

no test coverage detected