| [ Web Proxy ] |
| Viewing: https://matplotlib.org/stable/api/_as_gen/../_as_gen/matplotlib.widgets.RadioButtons.html | [Back] [Original] |
Section Navigation
matplotlibmatplotlib.animationmatplotlib.artistmatplotlib.axesmatplotlib.axismatplotlib.backend_basesmatplotlib.backend_managersmatplotlib.backend_toolsmatplotlib.backendsmatplotlib.backends.backend_mixedmatplotlib.backends.backend_templatematplotlib.backends.backend_aggmatplotlib.backends.backend_cairomatplotlib.backends.backend_gtk3agg, matplotlib.backends.backend_gtk3cairomatplotlib.backends.backend_gtk4agg, matplotlib.backends.backend_gtk4cairomatplotlib.backends.backend_nbaggmatplotlib.backends.backend_pdfmatplotlib.backends.backend_pgfmatplotlib.backends.backend_psmatplotlib.backends.registrymatplotlib.backends.backend_qtagg, matplotlib.backends.backend_qtcairomatplotlib.backends.backend_svgmatplotlib.backends.backend_tkagg, matplotlib.backends.backend_tkcairomatplotlib.backends.backend_webagg_corematplotlib.backends.backend_webaggmatplotlib.backends.backend_wxagg, matplotlib.backends.backend_wxcairomatplotlib.beziermatplotlib.categorymatplotlib.cbookmatplotlib.cmmatplotlib.collectionsmatplotlib.colorbarmatplotlib.colorizermatplotlib.colorsmatplotlib.containermatplotlib.contourmatplotlib.datesmatplotlib.dvireadmatplotlib.figurematplotlib.font_managermatplotlib.ft2fontmatplotlib.gridspec
matplotlib.hatchmatplotlib.imagematplotlib.insetmatplotlib.layout_enginematplotlib.legendmatplotlib.legend_handlermatplotlib.lines
matplotlib.markers
matplotlib.mathtextmatplotlib.mlabmatplotlib.offsetboxmatplotlib.patchesmatplotlib.pathmatplotlib.patheffectsmatplotlib.pyplotmatplotlib.projections
matplotlib.quiver
matplotlib.rcsetupmatplotlib.sankeymatplotlib.scalematplotlib.sphinxext.mathmplmatplotlib.sphinxext.plot_directivematplotlib.sphinxext.figmpl_directivematplotlib.sphinxext.rolesmatplotlib.spinesmatplotlib.stylematplotlib.tablematplotlib.testingmatplotlib.textmatplotlib.texmanagermatplotlib.tickermatplotlib.transformsmatplotlib.trimatplotlib.typingmatplotlib.unitsmatplotlib.widgetsmatplotlib._afmmatplotlib._apimatplotlib._docstringmatplotlib._enumsmatplotlib._type1fontmatplotlib._tight_bboxmatplotlib._tight_layoutmpl_toolkits.mplot3dmpl_toolkits.axes_grid1mpl_toolkits.axisartistpylabmatplotlib.widgetsBases: _Buttons
A GUI neutral radio button.
For the buttons to remain responsive you must keep a reference to this object.
Connect to the RadioButtons with the on_clicked method.
Add radio buttons to an Axes.
AxesThe Axes to add the buttons to.
The button labels.
The index of the initially selected button.
The color of the selected button. The default is 'blue' if not
specified here or in radio_props.
The layout of the radio buttons. Options are:
None: Use legacy vertical layout (default).
"vertical": Arrange buttons in a single column with
dynamic positioning based on text widths.
"horizontal": Arrange buttons in a single row with
dynamic positioning based on text widths.
(rows, cols) tuple: Arrange buttons in a grid with the
specified number of rows and columns. Buttons are placed
left-to-right, top-to-bottom with dynamic positioning.
The layout options "vertical", "horizontal" and (rows, cols)
create mtext.Text objects to determine exact text sizes, and
then they are added to the Axes. This is usually okay, but may cause
side-effects and has a slight performance impact. Therefore the
default None value avoids this.
Added in version 3.11.
Use blitting for faster drawing if supported by the backend. See the tutorial Faster rendering by using blitting for details.
Added in version 3.7.
Dictionary of Text properties to be used for the labels. Each
dictionary value should be a list of at least a single element. If
the list is of length M, its values are cycled such that the Nth
label gets the (N mod M) property.
Added in version 3.7.
Dictionary of scatter Collection properties to be used for the
radio buttons. Defaults to (label font size / 2)**2 size, black
edgecolor, and activecolor facecolor (when active).
Note
If a facecolor is supplied in radio_props, it will override activecolor. This may be used to provide an active color per button.
Added in version 3.7.
Select button with number index.
Callbacks will be triggered if eventson is True.
The index of the button to activate.
If the index is invalid.
Set properties of the Text labels.
Added in version 3.7.
Dictionary of Collection properties to be used for the radio
buttons.
matplotlib.widgets.RadioButtons#
Copyright 20022012 John Hunter, Darren Dale, Eric Firing, Michael Droettboom and the Matplotlib development team; 20122026 The Matplotlib development team.
Created using Sphinx 9.1.0.
Built from v3.11.2-1-g879ad8ebba.
Built with the PyData Sphinx Theme 0.16.1.
| Web Proxy Viewer | New URL | Original Page |