8000 Cleanup FancyArrowPatch docstring by timhoffm · Pull Request #13834 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Cleanup FancyArrowPatch docstring #13834

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 31 additions & 28 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -3943,27 +3943,28 @@ def __init__(self, posA=None, posB=None,
dpi_cor=1,
**kwargs):
"""
If *posA* and *posB* are given, a path connecting two points is
created according to *connectionstyle*. The path will be
clipped with *patchA* and *patchB* and further shrunken by
*shrinkA* and *shrinkB*. An arrow is drawn along this
resulting path using the *arrowstyle* parameter.
There are two ways for defining an arrow:

Alternatively if *path* is provided, an arrow is drawn along this path
and *patchA*, *patchB*, *shrinkA*, and *shrinkB* are ignored.
- If *posA* and *posB* are given, a path connecting two points is
created according to *connectionstyle*. The path will be
clipped with *patchA* and *patchB* and further shrunken by
*shrinkA* and *shrinkB*. An arrow is drawn along this
resulting path using the *arrowstyle* parameter.

- Alternatively if *path* is provided, an arrow is drawn along this
path and *patchA*, *patchB*, *shrinkA*, and *shrinkB* are ignored.

Parameters
----------

posA, posB : None, tuple, optional (default: None)
posA, posB : (float, float), optional (default: None)
(x,y) coordinates of arrow tail and arrow head respectively.

path : None, Path (default: None)
:class:`matplotlib.path.Path` instance. If provided, an arrow is
drawn along this path and *patchA*, *patchB*, *shrinkA*, and
*shrinkB* are ignored.
path : `~matplotlib.path.Path`, optional (default: None)
If provided, an arrow is drawn along this path and *patchA*,
*patchB*, *shrinkA*, and *shrinkB* are ignored.

arrowstyle : str or ArrowStyle, optional (default: 'simple')
arrowstyle : str or `.ArrowStyle`, optional (default: 'simple')
Describes how the fancy arrow will be
drawn. It can be string of the available arrowstyle names,
with optional comma-separated attributes, or an
Expand All @@ -3974,10 +3975,10 @@ def __init__(self, posA=None, posB=None,
%(AvailableArrowstyles)s

arrow_transmuter
Ignored
Ignored.

connectionstyle : str, ConnectionStyle, or None, optional
(default: 'arc3')
connectionstyle : str or `.ConnectionStyle` or None, optional \
(default: 'arc3')
Describes how *posA* and *posB* are connected. It can be an
instance of the :class:`ConnectionStyle` class or a string of the
connectionstyle name, with optional comma-separated attributes. The
Expand All @@ -3986,35 +3987,37 @@ def __init__(self, posA=None, posB=None,
%(AvailableConnectorstyles)s

connector
Ignored
Ignored.

patchA, patchB : None, Patch, optional (default: None)
patchA, patchB : `.Patch`, optional (default: None)
Head and tail patch respectively. :class:`matplotlib.patch.Patch`
instance.

shrinkA, shrinkB : scalar, optional (default: 2)
Shrinking factor of the tail and head of the arrow respectively
shrinkA, shrinkB : float, optional (default: 2)
Shrinking factor of the tail and head of the arrow respectively.

mutation_scale : scalar, optional (default: 1)
mutation_scale : float, optional (default: 1)
Value with which attributes of *arrowstyle* (e.g., *head_length*)
will be scaled.

mutation_aspect : None, scalar, optional (default: None)
mutation_aspect : None or float, optional (default: None)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove first mention of None? (or not, but be consistent with other params)

The height of the rectangle will be squeezed by this value before
the mutation and the mutated box will be stretched by the inverse
of it.

dpi_cor : scalar, optional (default: 1)
dpi_cor : float, optional (default: 1)
dpi_cor is currently used for linewidth-related things and shrink
factor. Mutation scale is affected by this.

Notes
-----
Valid kwargs are:
Other Parameters
----------------
**kwargs : `.Patch` properties, optional
Here is a list of available `.Patch` properties:

%(Patch)s

In contrast to other patches, the default ``capstyle`` and
``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
In contrast to other patches, the default ``capstyle`` and
``joinstyle`` for `FancyArrowPatch` are set to ``"round"``.
"""
if arrow_transmuter is not None:
cbook.warn_deprecated(
Expand Down
0