Movatterモバイル変換


[0]ホーム

URL:


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

TST: Use text placeholders for empty legends#29908

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tacaswell merged 1 commit intomatplotlib:mainfromQuLogic:legend-placeholders
Apr 17, 2025

Conversation

QuLogic
Copy link
Member

PR summary

These tests useremove_text=True and set legend labels to empty strings. However, they are still affected by font metrics because even the empty string is as tall as the line height (which is calculated from the height of the "lp" string.)

This depends on#29907.

PR checklist

@tacaswell
Copy link
Member

👍🏻 now needs a rebase.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

Now that text uses placeholders, can we changelabel=" " to some actual text likelabel="foo" orlabel="label"? This feels more normal and may be less confusing when reading the test, or when taking the code and running it without placeholders for debug purposes. Thelabel=" " was only there to reduce the font-rendering impact. I don't see a reason we should keep it.

Copy link
Member

Choose a reason for hiding this comment

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

Why don't the black boxesh show up here like they do in the png?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Ah, it just stopped after the first extension, and I didn't catch it.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Because thempl20 style doesn't have patch edges, I also decided to remove the forced blue colour on the bars, since they all look like single bars instead of stacked ones.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

I also reverted the texts here to the values before966e467

@QuLogicQuLogicforce-pushed thelegend-placeholders branch 3 times, most recently from92cd616 to2053e8cCompareApril 15, 2025 03:02
These tests use `remove_text=True` and set legend labels to emptystrings. However, they are still affected by font metrics because eventhe empty string is as tall as the line height (which is calculated fromthe height of the "lp" string.)
@tacaswelltacaswell modified the milestones:v3.11.0,v3.10.2Apr 17, 2025
@tacaswelltacaswell merged commitc1a2ec4 intomatplotlib:mainApr 17, 2025
39 of 41 checks passed
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestApr 17, 2025
@QuLogicQuLogic deleted the legend-placeholders branchApril 17, 2025 19:23
rcomer pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestApr 20, 2025
QuLogic pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestMay 6, 2025
@jkseppanjkseppan mentioned this pull requestMay 18, 2025
2 tasks
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@oscargusoscargusoscargus left review comments

@tacaswelltacaswelltacaswell approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.10.3
Development

Successfully merging this pull request may close these issues.

5 participants
@QuLogic@tacaswell@timhoffm@oscargus@dstansby

[8]ページ先頭

©2009-2025 Movatter.jp