Skip to content

Commit 725d2d7

Browse files
Backport PR matplotlib#32179: Document and fix AngleAnnotation constructor default case of using the current Axes (matplotlib#32180)
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 31a79b7 commit 725d2d7

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎galleries/examples/text_labels_and_annotations/angle_annotation.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def __init__(self, xy, p1, p2, size=75, unit="points", ax=None,
9191
* "axes min", "axes max": minimum or maximum of relative Axes
9292
width, height
9393
94-
ax : `matplotlib.axes.Axes`
94+
ax : `matplotlib.axes.Axes`, default: current Axes
9595
The Axes to add the angle annotation to.
9696
9797
text : str
@@ -128,7 +128,7 @@ def __init__(self, xy, p1, p2, size=75, unit="points", ax=None,
128128
xytext=(0, 0), textcoords="offset points",
129129
annotation_clip=True)
130130
self.kw.update(text_kw or {})
131-
self.text = ax.annotate(text, xy=self._center, **self.kw)
131+
self.text = self.ax.annotate(text, xy=self._center, **self.kw)
132132

133133
def get_size(self):
134134
factor = 1.

0 commit comments

Comments
 (0)