Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Remove warning for underscore artist names in legend() call, as it's deprecated #30464

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

Closed
skjerns wants to merge 1 commit into matplotlib:main from skjerns:patch-1

Conversation

Copy link

@skjerns skjerns commented Aug 25, 2025

Hiding certain artists names/handles with an underscore has been deprecated.

This removes the warning that is still in the code.

Copy link
Member

This warning is in the fully implicit code path and the filtering is not removed:

import matplotlib.pyplot as plt
fig, (ax1, ax2) = plt.subplots(1, 2, layout='constrained'q)
ax1.plot(range(5), label='_hidden')
ax1.plot(range(5)[::-1], label='shown')
ax1.legend()
ax1.set_title('implict legend')
ln1, = ax2.plot(range(5), label='_hidden')
ln2, = ax2.plot(range(5)[::-1], label='shown')
ax2.legend(handles=[ln1, ln2])
ax2.set_title('explicit legend')
plt.show()
so

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think we should remove this warning.

Copy link
Author

skjerns commented Aug 25, 2025

Makes sense! Thanks for clarifying in the other issue

tacaswell reacted with thumbs up emoji

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

@tacaswell tacaswell tacaswell requested changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /