Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit8ff57bb

Browse files
authored
Merge pull request#7029 from mobando/master
DOC: Updated documentation of arrow function to numpy docs format.
2 parentsdc855ed +ee5953a commit8ff57bb

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

‎lib/matplotlib/axes/_axes.py

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4532,13 +4532,34 @@ def arrow(self, x, y, dx, dy, **kwargs):
45324532
"""
45334533
Add an arrow to the axes.
45344534
4535-
Call signature::
4535+
Draws arrow on specified axis from (`x`, `y`) to (`x` + `dx`,
4536+
`y` + `dy`). Uses FancyArrow patch to construct the arrow.
4537+
4538+
Parameters
4539+
----------
4540+
x : float
4541+
X-coordinate of the arrow base
4542+
y : float
4543+
Y-coordinate of the arrow base
4544+
dx : float
4545+
Length of arrow along x-coordinate
4546+
dy : float
4547+
Length of arrow along y-coordinate
4548+
4549+
Returns
4550+
-------
4551+
a : FancyArrow
4552+
patches.FancyArrow object
45364553
4537-
arrow(x, y, dx, dy, **kwargs)
4554+
Other Parameters
4555+
-----------------
4556+
Optional kwargs (inherited from FancyArrow patch) control the arrow
4557+
construction and properties:
45384558
4539-
Draws arrow on specified axis from (*x*, *y*) to (*x* + *dx*,
4540-
*y* + *dy*). Uses FancyArrow patch to construct the arrow.
4559+
%(FancyArrow)s
45414560
4561+
Notes
4562+
-----
45424563
The resulting arrow is affected by the axes aspect ratio and limits.
45434564
This may produce an arrow whose head is not square with its stem. To
45444565
create an arrow whose head is square with its stem, use
@@ -4547,13 +4568,11 @@ def arrow(self, x, y, dx, dy, **kwargs):
45474568
ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
45484569
arrowprops=dict(arrowstyle="->"))
45494570
4550-
Optional kwargs control the arrow construction and properties:
4551-
4552-
%(FancyArrow)s
4553-
4554-
**Example:**
4571+
Examples
4572+
--------
45554573
45564574
.. plot:: mpl_examples/pylab_examples/arrow_demo.py
4575+
45574576
"""
45584577
# Strip away units for the underlying patch since units
45594578
# do not make sense to most patch-like code

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp