diff --git a/lib/matplotlib/axes/_axes.py b/lib/matplotlib/axes/_axes.py index 5cb4781036ae..f170e2434dfc 100644 --- a/lib/matplotlib/axes/_axes.py +++ b/lib/matplotlib/axes/_axes.py @@ -722,8 +722,8 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs): return t @docstring.dedent_interpd - def annotate(self, text, xy, *args, **kwargs): - a = mtext.Annotation(text, xy, *args, **kwargs) + def annotate(self, s, xy, *args, **kwargs): + a = mtext.Annotation(s, xy, *args, **kwargs) a.set_transform(mtransforms.IdentityTransform()) if 'clip_on' in kwargs: a.set_clip_path(self.patch) diff --git a/lib/matplotlib/pyplot.py b/lib/matplotlib/pyplot.py index bfc0615230b3..5134ea184739 100644 --- a/lib/matplotlib/pyplot.py +++ b/lib/matplotlib/pyplot.py @@ -2402,8 +2402,8 @@ def angle_spectrum( # Autogenerated by boilerplate.py. Do not edit as changes will be lost. @docstring.copy_dedent(Axes.annotate) -def annotate(text, xy, *args, **kwargs): - return gca().annotate(text=text, xy=xy, *args, **kwargs) +def annotate(s, xy, *args, **kwargs): + return gca().annotate(s=s, xy=xy, *args, **kwargs) # Autogenerated by boilerplate.py. Do not edit as changes will be lost.