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

Skip to content

Commit 0698e43

Browse files
author
Your Name
committed
DOC Updated documentation of arrow function to numpy docs format.
1 parent 5f553bc commit 0698e43

File tree

1 file changed

+31
-12
lines changed

1 file changed

+31
-12
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4522,13 +4522,35 @@ def arrow(self, x, y, dx, dy, **kwargs):
45224522
"""
45234523
Add an arrow to the axes.
45244524
4525-
Call signature::
4526-
4527-
arrow(x, y, dx, dy, **kwargs)
4528-
4529-
Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
4530-
*y* + *dy*). Uses FancyArrow patch to construct the arrow.
4531-
4525+
Draws arrow on specified axis from (`x`, `y`) to (`x` + `dx`,
4526+
`y` + `dy`). Uses FancyArrow patch to construct the arrow.
4527+
4528+
Parameters
4529+
----------
4530+
x : float
4531+
X-coordinate of the arrow base
4532+
y : float
4533+
Y-coordinate of the arrow base
4534+
dx : float
4535+
Length of arrow in x-coordinate
4536+
dy : float
4537+
Length of arrow in y-coordinate
4538+
4539+
Return
4540+
------
4541+
a : FancyArrow
4542+
patches.FancyArrow object
4543+
4544+
Other Parameters
4545+
-----------------
4546+
kwargs : `~matplotlib.patches.FancyArrow` properties.
4547+
4548+
See also
4549+
--------
4550+
%(FancyArrow)s : Parent object type.
4551+
4552+
Notes
4553+
-----
45324554
The resulting arrow is affected by the axes aspect ratio and limits.
45334555
This may produce an arrow whose head is not square with its stem. To
45344556
create an arrow whose head is square with its stem, use
@@ -4537,11 +4559,8 @@ def arrow(self, x, y, dx, dy, **kwargs):
45374559
ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
45384560
arrowprops=dict(arrowstyle="->"))
45394561
4540-
Optional kwargs control the arrow construction and properties:
4541-
4542-
%(FancyArrow)s
4543-
4544-
**Example:**
4562+
Examples
4563+
--------
45454564
45464565
.. plot:: mpl_examples/pylab_examples/arrow_demo.py
45474566
"""

0 commit comments

Comments
 (0)