**Defining the arrow position and path** There are two ways to define the arrow position and path: - **Start, end and connection**: The typical approach is to define the start and end points of the arrow using *posA* and *posB*. The curve between these
(self, posA=None, posB=None, *,
path=None, arrowstyle="simple", connectionstyle="arc3",
patchA=None, patchB=None, shrinkA=2, shrinkB=2,
mutation_scale=1, mutation_aspect=1, **kwargs)
| 4301 | |
| 4302 | @_docstring.interpd |
| 4303 | def __init__(self, posA=None, posB=None, *, |
| 4304 | path=None, arrowstyle="simple", connectionstyle="arc3", |
| 4305 | patchA=None, patchB=None, shrinkA=2, shrinkB=2, |
| 4306 | mutation_scale=1, mutation_aspect=1, **kwargs): |
| 4307 | """ |
| 4308 | **Defining the arrow position and path** |
| 4309 | |
| 4310 | There are two ways to define the arrow position and path: |
| 4311 | |
| 4312 | - **Start, end and connection**: |
| 4313 | The typical approach is to define the start and end points of the |
| 4314 | arrow using *posA* and *posB*. The curve between these two can |
| 4315 | further be configured using *connectionstyle*. |
| 4316 | |
| 4317 | If given, the arrow curve is clipped by *patchA* and *patchB*, |
| 4318 | allowing it to start/end at the border of these patches. |
| 4319 | Additionally, the arrow curve can be shortened by *shrinkA* and *shrinkB* |
| 4320 | to create a margin between start/end (after possible clipping) and the |
| 4321 | drawn arrow. |
| 4322 | |
| 4323 | - **path**: Alternatively if *path* is provided, an arrow is drawn along |
| 4324 | this Path. In this case, *connectionstyle*, *patchA*, *patchB*, |
| 4325 | *shrinkA*, and *shrinkB* are ignored. |
| 4326 | |
| 4327 | **Styling** |
| 4328 | |
| 4329 | The *arrowstyle* defines the styling of the arrow head, tail and shaft. |
| 4330 | The resulting arrows can be styled further by setting the `.Patch` |
| 4331 | properties such as *linewidth*, *color*, *facecolor*, *edgecolor* |
| 4332 | etc. via keyword arguments. |
| 4333 | |
| 4334 | Parameters |
| 4335 | ---------- |
| 4336 | posA, posB : (float, float), optional |
| 4337 | (x, y) coordinates of start and end point of the arrow. |
| 4338 | The actually drawn start and end positions may be modified |
| 4339 | through *patchA*, *patchB*, *shrinkA*, and *shrinkB*. |
| 4340 | |
| 4341 | *posA*, *posB* are exclusive of *path*. |
| 4342 | |
| 4343 | path : `~matplotlib.path.Path`, optional |
| 4344 | If provided, an arrow is drawn along this path and *patchA*, |
| 4345 | *patchB*, *shrinkA*, and *shrinkB* are ignored. |
| 4346 | |
| 4347 | *path* is exclusive of *posA*, *posB*. |
| 4348 | |
| 4349 | arrowstyle : str or `.ArrowStyle`, default: 'simple' |
| 4350 | The styling of arrow head, tail and shaft. This can be |
| 4351 | |
| 4352 | - `.ArrowStyle` or one of its subclasses |
| 4353 | - The shorthand string name (e.g. "->") as given in the table below, |
| 4354 | optionally containing a comma-separated list of style parameters, |
| 4355 | e.g. "->, head_length=10, head_width=5". |
| 4356 | |
| 4357 | The style parameters are scaled by *mutation_scale*. |
| 4358 | |
| 4359 | The following arrow styles are available. See also |
| 4360 | :doc:`/gallery/text_labels_and_annotations/fancyarrow_demo`. |
nothing calls this directly
no test coverage detected