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

DOC: annotation coords are not floats#24643

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
story645 merged 1 commit intomatplotlib:mainfromrcomer:annotate-xycoords
Dec 6, 2022

Conversation

rcomer
Copy link
Member

PR Summary

There may be a better way to phrase than what I have done here, but I'm pretty sure(float, float) is wrong. The more detailed description forxycoords within theAnnotation docstring states that it can be

A tuple (xcoords, ycoords) specifying separate coordinate systems for x and y. xcoords and ycoords must each be of one of the above described types.

PR Checklist

Documentation and Tests

  • [N/A] Has pytest style unit tests (andpytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a.. versionadded:: directive in the docstring and documented indoc/users/next_whats_new/
  • [N/A] API changes are marked with a.. versionchanged:: directive in the docstring and documented indoc/api/next_api_changes/
  • [N/A] Release notes conform with instructions innext_whats_new/README.rst ornext_api_changes/README.rst

@tacaswelltacaswell modified the milestones:v3.7.0,v3.6.3Dec 6, 2022
@@ -1243,12 +1243,12 @@ def __init__(self, offsetbox, xy,
is determined by *boxcoords*.

xycoords : str or `.Artist` or `.Transform` or callable or \
(float, float), default: 'data'
2-element tuple of these, default: 'data'
Copy link
Member

Choose a reason for hiding this comment

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

I'm confused since the default is a string and not a 2 element tuple- is this because we don't need to pass in a 2-tuple when the coordinate system is the same?

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Yes, exactly. See theAnnotationBBox demo, where some use a single string and some use two.

Copy link
Member

@story645story645Dec 6, 2022
edited
Loading

Choose a reason for hiding this comment

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

Sorry I didn't catch that this was a line continuation but I'm finding the 'these' so ambiguous that I'm I think extra confused so what about being annoyingly explicit, something like 'scaler or 2 element tuple of str, Artist, callable, or transform : default 'data' "

Copy link
Member

Choose a reason for hiding this comment

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

How about

xycoords :singleortwo-tupleofstr,`.Artist`,`.Transform`orcallable.

story645 and rcomer reacted with thumbs up emoji
@story645story645 merged commitbe03643 intomatplotlib:mainDec 6, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull requestDec 6, 2022
QuLogic added a commit that referenced this pull requestDec 6, 2022
…643-on-v3.6.xBackport PR#24643 on branch v3.6.x (DOC: annotation coords are not floats)
@rcomerrcomer mentioned this pull requestDec 9, 2022
6 tasks
@ksundenksunden mentioned this pull requestFeb 20, 2023
6 tasks
@rcomerrcomer deleted the annotate-xycoords branchMarch 4, 2023 21:15
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak left review comments

@tacaswelltacaswelltacaswell approved these changes

@story645story645story645 approved these changes

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

Successfully merging this pull request may close these issues.

4 participants
@rcomer@tacaswell@story645@jklymak

[8]ページ先頭

©2009-2025 Movatter.jp