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

test annotate(textcoords=offset fontsize)#25989

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
rcomer merged 1 commit intomatplotlib:mainfromsaranti:offset_fontsize
May 28, 2023

Conversation

saranti
Copy link
Contributor

PR summary

PR checklist

Closes#25907. Adds a test to check that the annotationoffset_fontsize parameter actually offsets the text by the correct fontsize units. The unit distance was measured by comparing the fontsize against the number of points inoffset_points

if i == 0:
points_coords = str(ann.get_window_extent())
else:
fontsize_coords = str(ann.get_window_extent())
Copy link
Contributor

Choose a reason for hiding this comment

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

would spell the whole thing

anns= [ax.annotate(...)foriin ...]point_coords,fontsize_coords= [ann.get_window_extent()foranninanns]assertstr(point_coords)==str(fontsize_coords)

but either way works.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

If you're happy with that, I'll squash it down 👍

anntzer reacted with thumbs up emoji
@rcomerrcomer added this to thev3.8.0 milestoneMay 28, 2023
@rcomerrcomer merged commit3218d1f intomatplotlib:mainMay 28, 2023
@sarantisaranti deleted the offset_fontsize branchJanuary 24, 2024 08:35
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@anntzeranntzeranntzer approved these changes

@rcomerrcomerrcomer approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
v3.8.0
Development

Successfully merging this pull request may close these issues.

[ENH]: Add test for annotate(textcoods="offset fontsize")
3 participants
@saranti@anntzer@rcomer

[8]ページ先頭

©2009-2025 Movatter.jp