Skip to content

Commit 350735e

Browse files
committed
Make most arguments to Figure/figure keyword only
1 parent 9b9684d commit 350735e

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
@@ -2359,18 +2359,17 @@ def __repr__(self):
23592359
naxes=len(self.axes),
23602360
)
23612361

2362-
@_api.make_keyword_only("3.6", "facecolor")
23632362
def __init__(self,
23642363
figsize=None,
23652364
dpi=None,
2365+
*,
23662366
facecolor=None,
23672367
edgecolor=None,
23682368
linewidth=0.0,
23692369
frameon=None,
23702370
subplotpars=None, # rc figure.subplot.*
23712371
tight_layout=None, # rc figure.autolayout
23722372
constrained_layout=None, # rc figure.constrained_layout.use
2373-
*,
23742373
layout=None,
23752374
**kwargs
23762375
):

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)