@@ -5471,10 +5471,22 @@ def on_changed(collection):
5471
5471
@_docstring .interpd
5472
5472
def arrow (self , x , y , dx , dy , ** kwargs ):
5473
5473
"""
5474
- Add an arrow to the Axes.
5474
+ [*Discouraged*] Add an arrow to the Axes.
5475
5475
5476
5476
This draws an arrow from ``(x, y)`` to ``(x+dx, y+dy)``.
5477
5477
5478
+ .. admonition:: Discouraged
5479
+
5480
+ The use of this method is discouraged because it is not guaranteed
5481
+ that the arrow renders reasonably. For example, the resulting arrow
5482
+ is affected by the Axes aspect ratio and limits, which may distort
5483
+ the arrow.
5484
+
5485
+ Consider using `~.Axes.annotate` without a text instead, e.g. ::
5486
+
5487
+ ax.annotate("", xytext=(0, 0), xy=(0.5, 0.5),
5488
+ arrowprops=dict(arrowstyle="->"))
5489
+
5478
5490
Parameters
5479
5491
----------
5480
5492
%(FancyArrow)s
@@ -5483,17 +5495,6 @@ def arrow(self, x, y, dx, dy, **kwargs):
5483
5495
-------
5484
5496
`.FancyArrow`
5485
5497
The created `.FancyArrow` object.
5486
-
5487
- Notes
5488
- -----
5489
- The resulting arrow is affected by the Axes aspect ratio and limits.
5490
- This may produce an arrow whose head is not square with its stem. To
5491
- create an arrow whose head is square with its stem,
5492
- use :meth:`annotate` for example:
5493
-
5494
- >>> ax.annotate("", xy=(0.5, 0.5), xytext=(0, 0),
5495
- ... arrowprops=dict(arrowstyle="->"))
5496
-
5497
5498
"""
5498
5499
# Strip away units for the underlying patch since units
5499
5500
# do not make sense to most patch-like code
0 commit comments