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

ENH: fig.annotate#28753

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

Draft
story645 wants to merge1 commit intomatplotlib:main
base:main
Choose a base branch
Loading
fromstory645:rainbow-fig
Draft

Conversation

story645
Copy link
Member

@story645story645 commentedAug 23, 2024
edited
Loading

PR summary

Based ongitter convo w/@tacaswell, thetext.Annotation object is a really simple way to make rainbow figure text, so:

  • updated the rainbow text example to show how to do it for figures
  • updated the annotation tutorial to show how to use annotate objects and add them to the figure

PR checklist

@story645story645 added topic: annotation Documentation: examplesfiles in galleries/examples Documentation: user guidefiles in galleries/users_explain or doc/users labelsAug 23, 2024
@anntzer
Copy link
Contributor

See also#25998.

story645 reacted with thumbs up emoji

@story645story645 mentioned this pull requestAug 23, 2024
@story645
Copy link
MemberAuthor

@anntzer yes I agree we should add a fig.annotate method.

Also this is lightweight enough that we should document how this works b/c I find the artist API just a bit intimidating.

…w textsCo-authored-by: Thomas A Caswell <tcaswell@gmail.com>
@story645
Copy link
MemberAuthor

also is the linting check running off main and so won't see this exception?

@timhoffm
Copy link
Member

Artist instantiation + add_artist should not be a first-class user-facing API. The standard pattern in matplotlib are functions to create the artists. I'd be very reluctant to dilute this. Frist and foremost I consider add_artist a low level API, that end-users should not have to use. It should be the very exception in examples and only show up in corner cases for which it is not worth having high-level API. If advertised in such a scenario, we should communicate that we use low-level API.

@story645
Copy link
MemberAuthor

story645 commentedAug 25, 2024
edited
Loading

Artist instantiation + add_artist should not be a first-class user-facing API. The standard pattern in matplotlib are functions to create the artists

So is that a second yes for@anntzer's proposal of a figure.annotate? As far as I can tell, the implementation is basically forward to artist + add artist to figure & if so I'll just update this PR to do that and then update these docs to show that.

I just wanted to document how you get figure level rainbow text and annotation b/c folks request it and I've needed at least the rainbow text a few times.

timhoffm reacted with thumbs up emoji

@tacaswell
Copy link
Member

Consensus on the call this week was to addFigure.annotate

timhoffm reacted with thumbs up emoji

@story645story645 marked this pull request as draftAugust 29, 2024 19:52
@story645story645 changed the titleDoc: using text.Annotation for figure annotationENH: fig.annotateAug 29, 2024
@story645story645 linked an issueJan 24, 2025 that may beclosed by this pull request
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Documentation: examplesfiles in galleries/examplesDocumentation: user guidefiles in galleries/users_explain or doc/userstopic: annotation
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[ENH]: Figure.annotate
4 participants
@story645@anntzer@timhoffm@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp