Skip to content

{Radio,Check}Buttons: Add 2D grid labels layout support#30803

Merged
QuLogic merged 3 commits intomatplotlib:mainfrom
doronbehar:RadioButtonsGrid
Feb 10, 2026
Merged

{Radio,Check}Buttons: Add 2D grid labels layout support#30803
QuLogic merged 3 commits intomatplotlib:mainfrom
doronbehar:RadioButtonsGrid

Conversation

@doronbehar
Copy link
Copy Markdown
Contributor

@doronbehar doronbehar commented Dec 1, 2025

PR summary

The RadioButtons widget now supports arranging buttons in a 2D grid by passing a list of lists of strings as the labels parameter. Each inner list represents a row in the grid.

Key features:

  • Active index and index_selected remain as single integers for the
    flattened array (reading left-to-right, top-to-bottom)
  • Column positions are automatically calculated based on the maximum
    text width in each column for optimal spacing
  • Text offset is now consistent between 1D and 2D layouts (0.10)
  • Includes new example: galleries/examples/widgets/radio_buttons_grid.py

🤖 Generated with Claude Code

Co-Authored-By: Claude [email protected]

PR checklist

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants