@@ -184,7 +184,7 @@ class FigureBase(Artist):
184184 Base class for `.figure.Figure` and `.figure.SubFigure` containing the
185185 methods that add artists to the figure or subfigure, create Axes, etc.
186186 """
187- def __init__ (self ):
187+ def __init__ (self , ** kwargs ):
188188 super ().__init__ ()
189189 # remove the non-figure artist _axes property
190190 # as it makes no sense for a figure to be _in_ an axes
@@ -217,6 +217,7 @@ def __init__(self):
217217 self .subfigs = []
218218 self .stale = True
219219 self .suppressComposite = None
220+ self .set (** kwargs )
220221
221222 def _get_draw_artists (self , renderer ):
222223 """Also runs apply_aspect"""
@@ -1923,6 +1924,7 @@ def _set_artist_props(self, a):
19231924 a .set_transform (self .transSubfigure )
19241925
19251926
1927+ @docstring .interpd
19261928class SubFigure (FigureBase ):
19271929 """
19281930 Logical figure that can be placed inside a figure.
@@ -1945,7 +1947,8 @@ def __init__(self, parent, subplotspec, *,
19451947 facecolor = None ,
19461948 edgecolor = None ,
19471949 linewidth = 0.0 ,
1948- frameon = None ):
1950+ frameon = None ,
1951+ ** kwargs ):
19491952 """
19501953 Parameters
19511954 ----------
@@ -1969,8 +1972,14 @@ def __init__(self, parent, subplotspec, *,
19691972
19701973 frameon : bool, default: :rc:`figure.frameon`
19711974 If ``False``, suppress drawing the figure background patch.
1975+
1976+ Other Parameters
1977+ ----------------
1978+ **kwargs : `.SubFigure` properties, optional
1979+
1980+ %(SubFigure:kwdoc)s
19721981 """
1973- super ().__init__ ()
1982+ super ().__init__ (** kwargs )
19741983 if facecolor is None :
19751984 facecolor = mpl .rcParams ['figure.facecolor' ]
19761985 if edgecolor is None :
@@ -2114,6 +2123,7 @@ def draw(self, renderer):
21142123 self .stale = False
21152124
21162125
2126+ @docstring .interpd
21172127class Figure (FigureBase ):
21182128 """
21192129 The top level container for all the plot elements.
@@ -2154,6 +2164,7 @@ def __init__(self,
21542164 subplotpars = None , # rc figure.subplot.*
21552165 tight_layout = None , # rc figure.autolayout
21562166 constrained_layout = None , # rc figure.constrained_layout.use
2167+ ** kwargs
21572168 ):
21582169 """
21592170 Parameters
@@ -2195,8 +2206,14 @@ def __init__(self,
21952206 :doc:`/tutorials/intermediate/constrainedlayout_guide`
21962207 for examples. (Note: does not work with `add_subplot` or
21972208 `~.pyplot.subplot2grid`.)
2209+
2210+ Other Parameters
2211+ ----------------
2212+ **kwargs : `.Figure` properties, optional
2213+
2214+ %(Figure:kwdoc)s
21982215 """
2199- super ().__init__ ()
2216+ super ().__init__ (** kwargs )
22002217
22012218 self .callbacks = cbook .CallbackRegistry ()
22022219 # Callbacks traditionally associated with the canvas (and exposed with
0 commit comments