8000 Addresses issue #5704. Makes usage of parameters clearer by devashishd12 · Pull Request #5709 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Addresses issue #5704. Makes usage of parameters clearer #5709

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
merged 5 commits into from
Dec 22, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Reduced no of characters to <80
  • Loading branch information
devashishd12 committed Dec 21, 2015
commit 8b2d58fa1267105af3be490d7d21cf0467b1e055
8 changes: 4 additions & 4 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -633,10 +633,10 @@ def annotate(self, *args, **kwargs):
label

xy : (x, y) , 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.

This does not default to 'data'.

I would add something to the body of this parameter like 'see xycoords to control what coordinate system this value is interpreted in' and something similar for xytext.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh sorry I'll remove the default value for xy. Yes what you said makes it much clearer but then I think I'll have to use the next line. Is it fine if I do so? Ideally I don't really want to do that though...

Copy link
Member

Choose a reason for hiding this comment

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

Use as many lines as you need.

Not everything can be documented in about half a tweet

On Tue, Dec 22, 2015, 01:34 Devashish Deshpande notifications@github.com
wrote:

In lib/matplotlib/axes/_axes.py
#5709 (comment):

@@ -632,22 +632,21 @@ def annotate(self, _args, *_kwargs):
s : string
label

  •    xy : (x, y)
    
  •        position of element to annotate
    
  •    xy : (x, y) , default: "data"
    

Oh sorry I'll remove the default value for xy. Yes what you said makes it
much clearer but then I think I'll have to use the next line. Is it fine if
I do so? Ideally I don't really want to do that though...


Reply to this email directly or view it on GitHub
https://github.com/matplotlib/matplotlib/pull/5709/files#r48225539.

position of element to annotate. Use xycoords param for additional types.
position of element to annotate. Use xycoords param for more types.

xytext : (x, y) , optional, default: None
position of the label `s`. Use textcoords param for additional types.
position of the label `s`. Use textcoords param for more types.

xycoords : string, optional, default: "data"
string that indicates what type of coordinates `xy` is. Examples:
Expand All @@ -648,13 +648,13 @@ def annotate(self, *args, **kwargs):
"figure points", "figure pixels", "figure fraction", "axes
points", .... See `matplotlib.text.Annotation` for more details.

arrowprops : `matplotlib.lines.Line2D` properties, optional, default: None
arrowprops : `matplotlib.lines.Line2D` properties, optional
Dictionary of line properties for the arrow that connects
the annotation to the point. If the dictionnary has a key
`arrowstyle`, a `~matplotlib.patches.FancyArrowPatch`
instance is created and drawn. See
`matplotlib.text.Annotation` for more details on valid
options.
options. Default is None.

Returns
-------
Expand Down
0