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

Skip to content

Commit f1a444e

Browse files
committed
Make most arguments to Figure/figure keyword only
1 parent 4d8f3dc commit f1a444e

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

lib/matplotlib/figure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2352,18 +2352,17 @@ def __repr__(self):
23522352
naxes=len(self.axes),
23532353
)
23542354

2355-
@_api.make_keyword_only("3.6", "facecolor")
23562355
def __init__(self,
23572356
figsize=None,
23582357
dpi=None,
2358+
*,
23592359
facecolor=None,
23602360
edgecolor=None,
23612361
linewidth=0.0,
23622362
frameon=None,
23632363
subplotpars=None, # rc figure.subplot.*
23642364
tight_layout=None, # rc figure.autolayout
23652365
constrained_layout=None, # rc figure.constrained_layout.use
2366-
*,
23672366
layout=None,
23682367
**kwargs
23692368
):

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,10 +687,10 @@ def xkcd(scale=1, length=100, randomness=2):
687687

688688
## Figures ##
689689

690-
@_api.make_keyword_only("3.6", "facecolor")
691690
def figure(num=None, # autoincrement if None, else integer from 1-N
692691
figsize=None, # defaults to rc figure.figsize
693692
dpi=None, # defaults to rc figure.dpi
693+
*,
694694
facecolor=None, # defaults to rc figure.facecolor
695695
edgecolor=None, # defaults to rc figure.edgecolor
696696
frameon=True,

0 commit comments

Comments
 (0)