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

Skip to content

update axes.arrow() and patches.FancyArrow documentation #941

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 2 commits into from
Jun 13, 2012
Merged
Show file tree
Hide file tree
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
Next Next commit
update axes.arrow() and patches.FancyArrow documentation
	to make more informative and add missing options

	modified:   lib/matplotlib/axes.py
	modified:   lib/matplotlib/patches.py
  • Loading branch information
kaufman committed Jun 10, 2012
commit 6e3a8bbd6e78578c4b260d51175f720a32ece51e
4 changes: 2 additions & 2 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -6372,9 +6372,9 @@ def arrow(self, x, y, dx, dy, **kwargs):
arrow(x, y, dx, dy, **kwargs)

Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
*y* + *dy*).
*y* + *dy*). Uses FancyArrow patch to construct the arrow.

Optional kwargs control the arrow properties:
Optional kwargs control the arrow construction and properties:

%(FancyArrow)s

Expand Down
29 changes: 19 additions & 10 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -920,21 +920,30 @@ def __init__(self, x, y, dx, dy, width=0.001, length_includes_head=False, \
head_starts_at_zero=False,**kwargs):
"""
Constructor arguments
width: float (default: 0.001)
width of full arrow tail

*length_includes_head*:
*True* if head is counted in calculating the length.
length_includes_head: [True | False] (default: False)
True if head is to be counted in calculating the length.

*shape*: ['full', 'left', 'right']
head_width: float or None (default: 3*width)
total width of the full arrow head

*overhang*:
distance that the arrow is swept back (0 overhang means
triangular shape).
head_length: float or None (default: 1.5 * head_width)
length of arrow head

*head_starts_at_zero*:
If *True*, the head starts being drawn at coordinate 0
instead of ending at coordinate 0.
shape: ['full', 'left', 'right'] (default: 'full')
draw the left-half, right-half, or full arrow

Valid kwargs are:
overhang: float (default: 0)
fraction that the arrow is swept back (0 overhang means
triangular shape). Can be negative or greater than one.

head_starts_at_zero: [True | False] (default: False)
if True, the head starts being drawn at coordinate 0
instead of ending at coordinate 0.

Other valid kwargs (inherited from Patch) are:
%(Patch)s

"""
Expand Down