Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6f0cbd4

Browse files
meeseeksmachinetimhoffm
authored andcommitted
Backport PR #12383: Revert change of parameter name in annotate() (#12399)
1 parent d7a89c1 commit 6f0cbd4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -722,8 +722,8 @@ def text(self, x, y, s, fontdict=None, withdash=False, **kwargs):
722722
return t
723723

724724
@docstring.dedent_interpd
725-
def annotate(self, text, xy, *args, **kwargs):
726-
a = mtext.Annotation(text, xy, *args, **kwargs)
725+
def annotate(self, s, xy, *args, **kwargs):
726+
a = mtext.Annotation(s, xy, *args, **kwargs)
727727
a.set_transform(mtransforms.IdentityTransform())
728728
if 'clip_on' in kwargs:
729729
a.set_clip_path(self.patch)

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2402,8 +2402,8 @@ def angle_spectrum(
24022402

24032403
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
24042404
@docstring.copy_dedent(Axes.annotate)
2405-
def annotate(text, xy, *args, **kwargs):
2406-
return gca().annotate(text=text, xy=xy, *args, **kwargs)
2405+
def annotate(s, xy, *args, **kwargs):
2406+
return gca().annotate(s=s, xy=xy, *args, **kwargs)
24072407

24082408

24092409
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.

0 commit comments

Comments
 (0)