Using Matplotlib, I can get the value of the Slider widget using "mySlider.val", which is very convenient. Is there an equivalent opportunity to get the current selection of the Radio button? I think this question is what this question was trying to ask, but the searcher did not provide a working example. I provide the following example pointing to the missing line of code I'm looking for.
from matplotlib.widgets import RadioButtons, Button, Slider import matplotlib.pyplot as plt axSlider = plt.axes([0.1, 0.8, 0.4, 0.05]) aSlider = Slider(axSlider,'A slider', 0,1, valinit=0.5) axRadio = plt.axes([0.1, 0.2, 0.3, 0.4]) butRadio = RadioButtons(axRadio, ('Top','Middle','Bottom')) axStatus = plt.axes([0.5, 0.2, 0.3, 0.4]) bStatus = Button(axStatus,'Get status of radio buttons') def get_status(val):
Here is the result:

If this is not possible, can you offer an elegant detour? I am currently using the "on_clicked" function for the Radio buttons and setting global variables with switch values, and this is dirty.
source share