@@ -1710,9 +1710,14 @@ def transform(renderer) -> Transform
1710
1710
1711
1711
arrowprops : dict, optional
1712
1712
The properties used to draw a `.FancyArrowPatch` arrow between the
1713
- positions *xy* and *xytext*. Note that the edge of the arrow
1714
- pointing to *xytext* will be centered on the text itself and may
1715
- not point directly to the coordinates given in *xytext*.
1713
+ positions *xy* and *xytext*.
1714
+
1715
+ Defaults to None, i.e. no arrow is drawn.
1716
+
1717
+ For historical reasons there are two different ways of usage, that
1718
+ are distinguised by whether 'arrowstyle' is specified in the dict.
1719
+
1720
+ **Simple arrow:**
1716
1721
1717
1722
If *arrowprops* does not contain the key 'arrowstyle' the
1718
1723
allowed keys are:
@@ -1727,35 +1732,22 @@ def transform(renderer) -> Transform
1727
1732
? Any key to :class:`matplotlib.patches.FancyArrowPatch`
1728
1733
========== ======================================================
1729
1734
1730
- If *arrowprops* contains the key 'arrowstyle' the
1731
- above keys are forbidden. The allowed values of
1732
- ``'arrowstyle'`` are:
1733
-
1734
- ============ =============================================
1735
- Name Attrs
1736
- ============ =============================================
1737
- ``'-'`` None
1738
- ``'->'`` head_length=0.4,head_width=0.2
1739
- ``'-['`` widthB=1.0,lengthB=0.2,angleB=None
1740
- ``'|-|'`` widthA=1.0,widthB=1.0
1741
- ``'-|>'`` head_length=0.4,head_width=0.2
1742
- ``'<-'`` head_length=0.4,head_width=0.2
1743
- ``'<->'`` head_length=0.4,head_width=0.2
1744
- ``'<|-'`` head_length=0.4,head_width=0.2
1745
- ``'<|-|>'`` head_length=0.4,head_width=0.2
1746
- ``'fancy'`` head_length=0.4,head_width=0.4,tail_width=0.4
1747
- ``'simple'`` head_length=0.5,head_width=0.5,tail_width=0.2
1748
- ``'wedge'`` tail_width=0.3,shrink_factor=0.5
1749
- ============ =============================================
1750
-
1751
- Valid keys for `~matplotlib.patches.FancyArrowPatch` are:
1735
+ The arrow is attached to the edge of the text box, the exact
1736
+ position (corners or centers) depending on where it's pointing to.
1737
+
1738
+ **Fancy arrow:**
1739
+
1740
+ This is used if 'arrowstyle' is provided in the *arrowprops*.
1741
+
1742
+ Valid keys are the following `~matplotlib.patches.FancyArrowPatch`
1743
+ parameters:
1752
1744
1753
1745
=============== ==================================================
1754
1746
Key Description
1755
1747
=============== ==================================================
1756
1748
arrowstyle the arrow style
1757
1749
connectionstyle the connection style
1758
- relpos default is (0.5, 0.5)
1750
+ relpos see below; default is (0.5, 0.5)
1759
1751
patchA default is bounding box of the text
1760
1752
patchB default is None
1761
1753
shrinkA default is 2 points
@@ -1765,7 +1757,12 @@ def transform(renderer) -> Transform
1765
1757
? any key for :class:`matplotlib.patches.PathPatch`
1766
1758
=============== ==================================================
1767
1759
1768
- Defaults to None, i.e. no arrow is drawn.
1760
+ The exact starting point position of the arrow is defined by
1761
+ *relpos*. It's a tuple of relative coordinates of the text box,
1762
+ where (0, 0) is the lower left corner and (1, 1) is the upper
1763
+ right corner. Values <0 and >1 are supported and specify points
1764
+ outside the text box. By default (0.5, 0.5) the starting point is
1765
+ centered in the text box.
1769
1766
1770
1767
annotation_clip : bool or None, default: None
1771
1768
Whether to draw the annotation when the annotation point *xy* is
0 commit comments