DOC: annotation coords are not floats#24643
Conversation
|
|
||
| xycoords : str or `.Artist` or `.Transform` or callable or \ | ||
| (float, float), default: 'data' | ||
| 2-element tuple of these, default: 'data' |
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?
There was a problem hiding this comment.
Yes, exactly. See the AnnotationBBox demo, where some use a single string and some use two.
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' "
There was a problem hiding this comment.
How about
xycoords : single or two-tuple of str, `.Artist`, `.Transform` or callable. 23c33f2 to
97e2184
Compare
…643-on-v3.6.x Backport PR #24643 on branch v3.6.x (DOC: annotation coords are not floats)
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