Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a3456c

Browse files
authored
Merge pull request #13834 from timhoffm/doc-fancyarrowpatch
Cleanup FancyArrowPatch docstring
2 parents 8be01cc + cc958a3 commit 7a3456c

File tree

1 file changed

+31
-28
lines changed

1 file changed

+31
-28
lines changed

lib/matplotlib/patches.py

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3943,27 +3943,28 @@ def __init__(self, posA=None, posB=None,
39433943
dpi_cor=1,
39443944
**kwargs):
39453945
"""
3946-
If *posA* and *posB* are given, a path connecting two points is
3947-
created according to *connectionstyle*. The path will be
3948-
clipped with *patchA* and *patchB* and further shrunken by
3949-
*shrinkA* and *shrinkB*. An arrow is drawn along this
3950-
resulting path using the *arrowstyle* parameter.
3946+
There are two ways for defining an arrow:
39513947
3952-
Alternatively if *path* is provided, an arrow is drawn along this path
3953-
and *patchA*, *patchB*, *shrinkA*, and *shrinkB* are ignored.
3948+
- If *posA* and *posB* are given, a path connecting two points is
3949+
created according to *connectionstyle*. The path will be
3950+
clipped with *patchA* and *patchB* and further shrunken by
3951+
*shrinkA* and *shrinkB*. An arrow is drawn along this
3952+
resulting path using the *arrowstyle* parameter.
3953+
3954+
- Alternatively if *path* is provided, an arrow is drawn along this
3955+
path and *patchA*, *patchB*, *shrinkA*, and *shrinkB* are ignored.
39543956
39553957
Parameters
39563958
----------
39573959
3958-
posA, posB : None, tuple, optional (default: None)
3960+
posA, posB : (float, float), optional (default: None)
39593961
(x,y) coordinates of arrow tail and arrow head respectively.
39603962
3961-
path : None, Path (default: None)
3962-
:class:`matplotlib.path.Path` instance. If provided, an arrow is
3963-
drawn along this path and *patchA*, *patchB*, *shrinkA*, and
3964-
*shrinkB* are ignored.
3963+
path : `~matplotlib.path.Path`, optional (default: None)
3964+
If provided, an arrow is drawn along this path and *patchA*,
3965+
*patchB*, *shrinkA*, and *shrinkB* are ignored.
39653966
3966-
arrowstyle : str or ArrowStyle, optional (default: 'simple')
3967+
arrowstyle : str or `.ArrowStyle`, optional (default: 'simple')
39673968
Describes how the fancy arrow will be
39683969
drawn. It can be string of the available arrowstyle names,
39693970
with optional comma-separated attributes, or an
@@ -3974,10 +3975,10 @@ def __init__(self, posA=None, posB=None,
39743975
%(AvailableArrowstyles)s
39753976
39763977
arrow_transmuter
3977-
Ignored
3978+
Ignored.
39783979
3979-
connectionstyle : str, ConnectionStyle, or None, optional
3980-
(default: 'arc3')
3980+
connectionstyle : str or `.ConnectionStyle` or None, optional \
3981+
(default: 'arc3')
39813982
Describes how *posA* and *posB* are connected. It can be an
39823983
instance of the :class:`ConnectionStyle` class or a string of the
39833984
connectionstyle name, with optional comma-separated attributes. The
@@ -3986,35 +3987,37 @@ def __init__(self, posA=None, posB=None,
39863987
%(AvailableConnectorstyles)s
39873988
39883989
connector
3989-
Ignored
3990+
Ignored.
39903991
3991-
patchA, patchB : None, Patch, optional (default: None)
3992+
patchA, patchB : `.Patch`, optional (default: None)
39923993
Head and tail patch respectively. :class:`matplotlib.patch.Patch`
39933994
instance.
39943995
3995-
shrinkA, shrinkB : scalar, optional (default: 2)
3996-
Shrinking factor of the tail and head of the arrow respectively
3996+
shrinkA, shrinkB : float, optional (default: 2)
3997+
Shrinking factor of the tail and head of the arrow respectively.
39973998
3998-
mutation_scale : scalar, optional (default: 1)
3999+
mutation_scale : float, optional (default: 1)
39994000
Value with which attributes of *arrowstyle* (e.g., *head_length*)
40004001
will be scaled.
40014002
4002-
mutation_aspect : None, scalar, optional (default: None)
4003+
mutation_aspect : None or float, optional (default: None)
40034004
The height of the rectangle will be squeezed by this value before
40044005
the mutation and the mutated box will be stretched by the inverse
40054006
of it.
40064007
4007-
dpi_cor : scalar, optional (default: 1)
4008+
dpi_cor : float, optional (default: 1)
40084009
dpi_cor is currently used for linewidth-related things and shrink
40094010
factor. Mutation scale is affected by this.
40104011
4011-
Notes
4012-
-----
4013-
Valid kwargs are:
4012+
Other Parameters
4013+
----------------
4014+
**kwargs : `.Patch` properties, optional
4015+
Here is a list of available `.Patch` properties:
4016+
40144017
%(Patch)s
40154018
4016-
In contrast to other patches, the default ``capstyle`` and
4017-
``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
4019+
In contrast to other patches, the default ``capstyle`` and
4020+
``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
40184021
"""
40194022
if arrow_transmuter is not None:
40204023
cbook.warn_deprecated(

0 commit comments

Comments
 (0)