Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61db294 commit 04d8fdaCopy full SHA for 04d8fda
lib/matplotlib/widgets.py
@@ -1488,8 +1488,10 @@ def set_active(self, index):
1488
if index not in range(len(self.labels)):
1489
raise ValueError(f'Invalid RadioButton index: {index}')
1490
self.value_selected = self.labels[index].get_text()
1491
- self._buttons.get_facecolor()[:] = colors.to_rgba("none")
1492
- self._buttons.get_facecolor()[index] = colors.to_rgba(self.activecolor)
+ button_facecolors = self._buttons.get_facecolor()
+ button_facecolors[:] = colors.to_rgba("none")
1493
+ button_facecolors[index] = colors.to_rgba(self.activecolor)
1494
+ self._buttons.set_facecolor(button_facecolors)
1495
if hasattr(self, "_circles"): # Remove once circles is removed.
1496
for i, p in enumerate(self._circles):
1497
p.set_facecolor(self.activecolor if i == index else "none")
0 commit comments