Set properties of the `.Text` labels. .. versionadded:: 3.7 Parameters ---------- props : dict Dictionary of `.Collection` properties to be used for the radio buttons.
(self, props)
| 1896 | for i, activecolor in enumerate(self._active_colors)]) |
| 1897 | |
| 1898 | def set_radio_props(self, props): |
| 1899 | """ |
| 1900 | Set properties of the `.Text` labels. |
| 1901 | |
| 1902 | .. versionadded:: 3.7 |
| 1903 | |
| 1904 | Parameters |
| 1905 | ---------- |
| 1906 | props : dict |
| 1907 | Dictionary of `.Collection` properties to be used for the radio |
| 1908 | buttons. |
| 1909 | """ |
| 1910 | _api.check_isinstance(dict, props=props) |
| 1911 | if 's' in props: # Keep API consistent with constructor. |
| 1912 | props['sizes'] = np.broadcast_to(props.pop('s'), len(self.labels)) |
| 1913 | self._buttons.update(props) |
| 1914 | self._active_colors = self._buttons.get_facecolor() |
| 1915 | if len(self._active_colors) == 1: |
| 1916 | self._active_colors = np.repeat(self._active_colors, |
| 1917 | len(self.labels), axis=0) |
| 1918 | self._buttons.set_facecolor( |
| 1919 | [activecolor if text.get_text() == self.value_selected else "none" |
| 1920 | for text, activecolor in zip(self.labels, self._active_colors)]) |
| 1921 | |
| 1922 | @property |
| 1923 | def activecolor(self): |