-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
[Doc]: annotation_clip=None not correctly documented #22563
Copy link
Copy link
Closed
Labels
Milestone
Description
Documentation Link
Problem
The documentation of Axes.annotate resp. mpl.text.Annotate states about annotation_clip parameter:
https://github.com/matplotlib/matplotlib/blob/main/lib/matplotlib/text.py#L1776
annotation_clip : bool or None, default: None
Whether to draw the annotation when the annotation point *xy* is
outside the axes area.
- If *True*, the annotation will only be drawn when *xy* is
within the axes.
- If *False*, the annotation will always be drawn.
- If *None*, the annotation will only be drawn when *xy* is
within the axes and *xycoords* is 'data'.
Suggested improvement
I think the behavior is different for the default annotation_clip=None.
It should be
- If None, the annotation will only be drawn when xy is
within the axesandor xycoords is not 'data'.
Because this sounds a bit complicated, I'd suggest
annotation_clip : bool or None, default: None
Whether to clip (i.e. not draw) the annotation when the annotation point *xy* is
outside the axes area.
- If *True*, the annotation will be clipped when *xy* is outside the axes.
- If *False*, the annotation will always be drawn.
- If *None*, the annotation will be clipped when *xy* is outside the axes and *xycoords* is 'data'.
Reactions are currently unavailable