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

Skip to content

Commit 8fb850e

Browse files
authored
Merge pull request #18704 from timhoffm/doc-cla
Fix docstring of Axes.cla()
2 parents b2802b5 + d978b3b commit 8fb850e

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1088,7 +1088,7 @@ def sharey(self, other):
10881088
self.yaxis._scale = other.yaxis._scale
10891089

10901090
def cla(self):
1091-
"""Clear the current axes."""
1091+
"""Clear the axes."""
10921092
# Note: this is called by Axes.__init__()
10931093

10941094
# stash the current visibility state

lib/matplotlib/pyplot.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,12 @@ def sca(ax):
10641064
ax.figure.sca(ax)
10651065

10661066

1067+
def cla():
1068+
"""Clear the current axes."""
1069+
# Not generated via boilerplate.py to allow a different docstring.
1070+
return gca().cla()
1071+
1072+
10671073
## More ways of creating axes ##
10681074

10691075
@docstring.dedent_interpd
@@ -2626,12 +2632,6 @@ def broken_barh(xranges, yrange, *, data=None, **kwargs):
26262632
**({"data": data} if data is not None else {}), **kwargs)
26272633

26282634

2629-
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
2630-
@_copy_docstring_and_deprecators(Axes.cla)
2631-
def cla():
2632-
return gca().cla()
2633-
2634-
26352635
# Autogenerated by boilerplate.py. Do not edit as changes will be lost.
26362636
@_copy_docstring_and_deprecators(Axes.clabel)
26372637
def clabel(CS, levels=None, **kwargs):

tools/boilerplate.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ def boilerplate_gen():
201201
'barh',
202202
'boxplot',
203203
'broken_barh',
204-
'cla',
205204
'clabel',
206205
'cohere',
207206
'contour',

0 commit comments

Comments
 (0)