Skip to content

[Bug]: RadioButtons should be circular, not elliptic #24428

Closed
@anntzer

Description

@anntzer

Bug summary

RadioButtons are drawn as Circles in transAxes space, which means that as soon as the containing Axes is not equal-aspect, they will actually be elliptical, not circular.
In order to fix this, either the parent axes must be forced to be equal-aspect (we already remove the ticks and the navigatability, so more configuration may be OK), or we should use add functionality to Circle so that the center and the radius can be in different transform systems (center in transAxes, radius in pixels) -- or abuse scatter() instead to draw the radiobuttons (but this would break the radiobuttons.circles attribute).

Code for reproduction

https://matplotlib.org/stable/gallery/widgets/radio_buttons.html
and make the window much wider than tall

Actual outcome

radio buttons are elliptical

Expected outcome

radio buttons stay circular

Additional information

No response

Operating system

fedora37

Matplotlib Version

3.7.0.dev619+g3d6c3da884

Matplotlib Backend

any

Python version

3.10

Jupyter version

ENOSUCHLIB

Installation

git checkout

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions