(self, text_size, active, activecolor, radio_props)
| 1865 | self.index_selected = active |
| 1866 | |
| 1867 | def _init_props(self, text_size, active, activecolor, radio_props): |
| 1868 | radio_props = { |
| 1869 | 's': text_size**2, |
| 1870 | **radio_props, |
| 1871 | 'marker': 'o', |
| 1872 | 'transform': self.ax.transAxes, |
| 1873 | 'animated': self._useblit and self.canvas.supports_blit, |
| 1874 | # TODO: This may need an update when switching out the canvas. |
| 1875 | # Can set this to `_useblit` only and live with the animated=True |
| 1876 | # overhead on unsupported backends. |
| 1877 | |
| 1878 | } |
| 1879 | radio_props.setdefault('edgecolor', radio_props.get('color', 'black')) |
| 1880 | radio_props.setdefault('facecolor', |
| 1881 | radio_props.pop('color', activecolor)) |
| 1882 | self._buttons = self.ax.scatter( |
| 1883 | self._buttons_xs, |
| 1884 | self._buttons_ys, |
| 1885 | **radio_props, |
| 1886 | ) |
| 1887 | # The user may have passed custom colours in radio_props, so we need to |
| 1888 | # create the radios, and modify the visibility after getting whatever |
| 1889 | # the user set. |
| 1890 | self._active_colors = self._buttons.get_facecolor() |
| 1891 | if len(self._active_colors) == 1: |
| 1892 | self._active_colors = np.repeat(self._active_colors, len(self.labels), |
| 1893 | axis=0) |
| 1894 | self._buttons.set_facecolor( |
| 1895 | [activecolor if i == active else "none" |
| 1896 | for i, activecolor in enumerate(self._active_colors)]) |
| 1897 | |
| 1898 | def set_radio_props(self, props): |
| 1899 | """ |
nothing calls this directly
no test coverage detected