DOC: annotation coords are not floats#24643
Merged
story645 merged 1 commit intomatplotlib:mainfrom Dec 6, 2022
Merged
Conversation
tacaswell
approved these changes
Dec 6, 2022
story645
reviewed
Dec 6, 2022
lib/matplotlib/offsetbox.py
Outdated
|
|
||
| xycoords : str or `.Artist` or `.Transform` or callable or \ | ||
| (float, float), default: 'data' | ||
| 2-element tuple of these, default: 'data' |
Member
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
Yes, exactly. See the AnnotationBBox demo, where some use a single string and some use two.
Member
There was a problem hiding this comment.
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' "
Member
There was a problem hiding this comment.
How about
xycoords : single or two-tuple of str, `.Artist`, `.Transform` or callable. 23c33f2 to
97e2184
Compare
story645
approved these changes
Dec 6, 2022
meeseeksmachine
pushed a commit
to meeseeksmachine/matplotlib
that referenced
this pull request
Dec 6, 2022
QuLogic
added a commit
that referenced
this pull request
Dec 6, 2022
…643-on-v3.6.x Backport PR #24643 on branch v3.6.x (DOC: annotation coords are not floats)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 forxycoordswithin the Annotation docstring states that it can bePR Checklist
Documentation and Tests
pytestpasses)Release Notes
.. versionadded::directive in the docstring and documented indoc/users/next_whats_new/.. versionchanged::directive in the docstring and documented indoc/api/next_api_changes/next_whats_new/README.rstornext_api_changes/README.rst