Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: clear() method for widgets.RadioButtons #10922

Closed
raamana opened this issue Mar 30, 2018 · 9 comments · Fixed by #13401
Closed

ENH: clear() method for widgets.RadioButtons #10922

raamana opened this issue Mar 30, 2018 · 9 comments · Fixed by #13401

Comments

@raamana
Copy link
Contributor

raamana commented Mar 30, 2018

Enhancement proposed

Right now, RadioButtons can be created without activating any of the individual buttons, but they can not be cleared once created. It can be achieved in a dirty way, by hacking properties of the associated artists. However, I feel they need to come with a clear() method which deactivates previously selected one - it simply has to do two things: update the button colour and set value_selected to None. If this is acceptable, I'll be happy to send in a PR.

@WeatherGod
Copy link
Member

WeatherGod commented Mar 30, 2018 via email

@raamana
Copy link
Contributor Author

raamana commented Mar 30, 2018

that's true - I can do that as well.

@ImportanceOfBeingErnest
Copy link
Member

Checkboxes can at least be all unchecked individually. So there would be no definitive need for such feature as in the case of radio buttons. But since this would probably be equally easy to add, why not.

@raamana
Copy link
Contributor Author

raamana commented Mar 30, 2018

I also would like to modify the behaviour of CheckButtons.set_active() method - which is currently a toggle function - to reflect its name better (sets a button regardless of its previous state). If its important to keep the current behaviour as it reflects the mouse click behaviour, we should rename it as toggle to reduce the cognitive overload and confusion :)

@WeatherGod
Copy link
Member

WeatherGod commented Mar 30, 2018 via email

@ImportanceOfBeingErnest
Copy link
Member

But feel free to update the docstring of the method to make this behaviour more apparent.

@raamana
Copy link
Contributor Author

raamana commented Mar 31, 2018

Hey guys, take a look at #10924

@github-actions
Copy link

github-actions bot commented May 3, 2023

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label May 3, 2023
@QuLogic
Copy link
Member

QuLogic commented May 10, 2023

To take care of this, I've rebased the linked orphaned PR and will do a bit of cleanup as well.

@github-actions github-actions bot removed the status: inactive Marked by the “Stale” Github Action label May 11, 2023
@QuLogic QuLogic added this to the v3.9.0 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment