Axes.
arrow
(x, y, dx, dy, **kwargs)¶Add an arrow to the axes.
Draws arrow on specified axis from (x
, y
) to (x
+ dx
,
y
+ dy
). Uses FancyArrow patch to construct the arrow.
Parameters: | x : float
y : float
dx : float
dy : float
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns: | a : FancyArrow
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Other Parameters: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Optional kwargs (inherited from FancyArrow patch) control the arrow construction and properties: Constructor arguments
Other valid kwargs (inherited from :class:`Patch`) are:
|
Notes
The resulting arrow is affected by the axes aspect ratio and limits.
This may produce an arrow whose head is not square with its stem. To
create an arrow whose head is square with its stem, use
annotate()
for example:
ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
arrowprops=dict(arrowstyle="->"))
Examples
(Source code, png, pdf)