Skip to content

[Doc]: patches.FancyArrowPatch() and Donut demo: angleA and angleB not clearly defined #27181

@rlpitts

Description

@rlpitts

Documentation Link

https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.FancyArrowPatch.html#matplotlib.patches.FancyArrowPatch

Problem

The FancyArrowPatch() documentation does not adequately describe how angleA and angleB are defined, and the notes on those parameters in the regular ArrowPatch() documentation do not clearly translate to their usage in FancyArrowPatch(). This is a problem if, for example, one tries to use the Donut chart labelling example with data that results in 2 annotation boxes sitting on top of each other.

Suggested improvement

Please add the following description, or something similar, to the FancyArrowPatch() documentation or the annotate() documentation where it describes arrowprops kwargs:

angleA and angleB are both measured counterclockwise from the positive x-axis, where the vertex referenced by angleA is at the base of the arrow, and the vertex referenced by angleB is at the head of the arrow.

It might also be good to include a similar description in the donut example to specify that the vertex of angleA is where the arrow meets the textbox, and the vertex of angleB is at the point that is being annotated.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions