matplotlib / matplotlib/matplotlib

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

Open
#27,181 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation topic: arrow
Dominant language
Python
Stars
23.2k
Forks
8.5k
Avg merge
1d 6h
Merged PRs (30d)
66

Description

### 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](https://matplotlib.org/stable/gallery/pie_and_polar_charts/pie_and_donut_labels.html#sphx-glr-gallery-pie-and-polar-charts-pie-and-donut-labels-py) 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](https://matplotlib.org/stable/gallery/pie_and_polar_charts/pie_and_donut_labels.html#sphx-glr-gallery-pie-and-polar-charts-pie-and-donut-labels-py) 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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the FancyArrowPatch API documentation linked in the issue, then review the pie and donut labels example. Clarify how angleA and angleB are measured and which vertices they reference; if appropriate, add the same context to the donut example. Done means the documentation removes the ambiguity described in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-visualization, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.