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

Add API function for removing legend label from graph #6901

Closed
alexanderwhatley opened this issue Aug 4, 2016 · 2 comments
Closed

Add API function for removing legend label from graph #6901

alexanderwhatley opened this issue Aug 4, 2016 · 2 comments

Comments

@alexanderwhatley
Copy link

Right now, there does not appear to be an API function for removing a legend label from a matplotlib graph. This could be useful for say an interactive graph.

@fariza
Copy link
Member

fariza commented Aug 8, 2016

You can do it by

for leg in list(fig.legends):
                leg.set_visible(state)

Where state is True/False

@fariza
Copy link
Member

fariza commented Aug 8, 2016

I am closing this issue, if the answer is not what you were looking for, please reopen the issue

@fariza fariza closed this as completed Aug 8, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants