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

Skip to content

Commit 190b6bd

Browse files
authored
Merge pull request #22421 from anntzer/fkwo
Make most params to figure()/Figure() kwonly.
2 parents 5f966f5 + b5252b4 commit 190b6bd

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Parameters to ``plt.figure()`` and the ``Figure`` constructor
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
All parameters to `.pyplot.figure` and the `.Figure` constructor, other than
4+
*num*, *figsize*, and *dpi*, will become keyword-only after a deprecation
5+
period.

lib/matplotlib/figure.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2129,6 +2129,7 @@ def __repr__(self):
21292129
naxes=len(self.axes),
21302130
)
21312131

2132+
@_api.make_keyword_only("3.6", "facecolor")
21322133
def __init__(self,
21332134
figsize=None,
21342135
dpi=None,

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ def __exit__(self, *args):
667667

668668
## Figures ##
669669

670+
@_api.make_keyword_only("3.6", "facecolor")
670671
def figure(num=None, # autoincrement if None, else integer from 1-N
671672
figsize=None, # defaults to rc figure.figsize
672673
dpi=None, # defaults to rc figure.dpi

0 commit comments

Comments
 (0)