@@ -64,6 +64,9 @@ def __init__(self, **kwargs):
6464 self ._params = {}
6565
6666 def set (self , ** kwargs ):
67+ """
68+ Set the parameters for the layout engine.
69+ """
6770 raise NotImplementedError
6871
6972 @property
@@ -120,6 +123,9 @@ def __init__(self, adjust_compatible, colorbar_gridspec, **kwargs):
120123 super ().__init__ (** kwargs )
121124
122125 def execute (self , fig ):
126+ """
127+ Do nothing.
128+ """
123129 return
124130
125131
@@ -138,7 +144,7 @@ def __init__(self, *, pad=1.08, h_pad=None, w_pad=None,
138144
139145 Parameters
140146 ----------
141- pad : float, 1.08
147+ pad : float, default: 1.08
142148 Padding between the figure edge and the edges of subplots, as a
143149 fraction of the font size.
144150 h_pad, w_pad : float
@@ -182,6 +188,21 @@ def execute(self, fig):
182188 fig .subplots_adjust (** kwargs )
183189
184190 def set (self , * , pad = None , w_pad = None , h_pad = None , rect = None ):
191+ """
192+ Set the pads for tight_layout.
193+
194+ Parameters
195+ ----------
196+ pad : float
197+ Padding between the figure edge and the edges of subplots, as a
198+ fraction of the font size.
199+ w_pad, h_pad : float
200+ Padding (width/height) between edges of adjacent subplots.
201+ Defaults to *pad*.
202+ rect : tuple (left, bottom, right, top)
203+ rectangle in normalized figure coordinates that the subplots
204+ (including labels) will fit into.
205+ """
185206 for td in self .set .__kwdefaults__ :
186207 if locals ()[td ] is not None :
187208 self ._params [td ] = locals ()[td ]
0 commit comments