Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0370181

Browse filesBrowse files
committed
Merge pull request #7029 from mobando/master
DOC: Updated documentation of arrow function to numpy docs format.
1 parent 2e12ac9 commit 0370181
Copy full SHA for 0370181

File tree

Expand file treeCollapse file tree

1 file changed

+28
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+28
-9
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+28-9Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4530,13 +4530,34 @@ def arrow(self, x, y, dx, dy, **kwargs):
45304530
"""
45314531
Add an arrow to the axes.
45324532
4533-
Call signature::
4533+
Draws arrow on specified axis from (`x`, `y`) to (`x` + `dx`,
4534+
`y` + `dy`). Uses FancyArrow patch to construct the arrow.
4535+
4536+
Parameters
4537+
----------
4538+
x : float
4539+
X-coordinate of the arrow base
4540+
y : float
4541+
Y-coordinate of the arrow base
4542+
dx : float
4543+
Length of arrow along x-coordinate
4544+
dy : float
4545+
Length of arrow along y-coordinate
4546+
4547+
Returns
4548+
-------
4549+
a : FancyArrow
4550+
patches.FancyArrow object
45344551
4535-
arrow(x, y, dx, dy, **kwargs)
4552+
Other Parameters
4553+
-----------------
4554+
Optional kwargs (inherited from FancyArrow patch) control the arrow
4555+
construction and properties:
45364556
4537-
Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
4538-
*y* + *dy*). Uses FancyArrow patch to construct the arrow.
4557+
%(FancyArrow)s
45394558
4559+
Notes
4560+
-----
45404561
The resulting arrow is affected by the axes aspect ratio and limits.
45414562
This may produce an arrow whose head is not square with its stem. To
45424563
create an arrow whose head is square with its stem, use
@@ -4545,13 +4566,11 @@ def arrow(self, x, y, dx, dy, **kwargs):
45454566
ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
45464567
arrowprops=dict(arrowstyle="->"))
45474568
4548-
Optional kwargs control the arrow construction and properties:
4549-
4550-
%(FancyArrow)s
4551-
4552-
**Example:**
4569+
Examples
4570+
--------
45534571
45544572
.. plot:: mpl_examples/pylab_examples/arrow_demo.py
4573+
45554574
"""
45564575
# Strip away units for the underlying patch since units
45574576
# do not make sense to most patch-like code

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.