Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backport PR #24643 on branch v3.6.x (DOC: annotation coords are not floats) #24647

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/matplotlib/offsetbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -1298,13 +1298,13 @@ def __init__(self, offsetbox, xy,
The position *(x, y)* to place the text at. The coordinate system
is determined by *boxcoords*.

xycoords : str or `.Artist` or `.Transform` or callable or \
(float, float), default: 'data'
xycoords : single or two-tuple of str or `.Artist` or `.Transform` or \
callable, default: 'data'
The coordinate system that *xy* is given in. See the parameter
*xycoords* in `.Annotation` for a detailed description.

boxcoords : str or `.Artist` or `.Transform` or callable or \
(float, float), default: value of *xycoords*
boxcoords : single or two-tuple of str or `.Artist` or `.Transform` \
or callable, default: value of *xycoords*
The coordinate system that *xybox* is given in. See the parameter
*textcoords* in `.Annotation` for a detailed description.

Expand Down
8 changes: 4 additions & 4 deletions lib/matplotlib/text.py
Original file line number Diff line number Diff line change
Expand Up @@ -1660,8 +1660,8 @@ def __init__(self, text, xy,
The position *(x, y)* to place the text at. The coordinate system
is determined by *textcoords*.

xycoords : str or `.Artist` or `.Transform` or callable or \
(float, float), default: 'data'
xycoords : single or two-tuple of str or `.Artist` or `.Transform` or \
callable, default: 'data'

The coordinate system that *xy* is given in. The following types
of values are supported:
Expand Down Expand Up @@ -1713,8 +1713,8 @@ def transform(renderer) -> Transform

See :ref:`plotting-guide-annotation` for more details.

textcoords : str or `.Artist` or `.Transform` or callable or \
(float, float), default: value of *xycoords*
textcoords : single or two-tuple of str or `.Artist` or `.Transform` \
or callable, default: value of *xycoords*
The coordinate system that *xytext* is given in.

All *xycoords* values are valid as well as the following
Expand Down