class_docstr: A grid layout to place subplots within a figure.
  
  The location of the grid cells is determined in a similar way to
  `.SubplotParams` using *left*, *right*, *top*, *bottom*, *wspace*
  and *hspace*.
  
  Indexing a GridSpec instance returns a `.SubplotSpec`.
class_docstr_tok: ["A","grid","layout","to","place","subplots","within","a","figure",".","The","location","of","the","grid","cells","is","determined","in","a","similar","way","to","`",".SubplotParams","`","using","*","left","*",",","*","right","*",",","*","top","*",",","*","bottom","*",",","*","wspace","*","and","*","hspace","*",".","Indexing","a","GridSpec","instance","returns","a","`",".SubplotSpec","`","."]
docstr: Adjust subplot parameters to give specified padding.
  
  Parameters
  ----------
  figure : `.Figure`
      The figure.
  renderer :  `.RendererBase` subclass, optional
      The renderer to be used.
  pad : float
      Padding between the figure edge and the edges of subplots, as a
      fraction of the font-size.
  h_pad, w_pad : float, optional
      Padding (height/width) between edges of adjacent subplots.
      Defaults to *pad*.
  rect : tuple (left, bottom, right, top), default: None
      (left, bottom, right, top) rectangle in normalized figure
      coordinates that the whole subplots area (including labels) will
      fit into. Default (None) is the whole figure.
code: def tight_layout(
      self,
      figure,
      renderer=None,
      pad=1.08,
      h_pad=None,
      w_pad=None,
      rect=None,
  ):
      """
      Adjust subplot parameters to give specified padding.
  
      Parameters
      ----------
      figure : `.Figure`
          The figure.
      renderer :  `.RendererBase` subclass, optional
          The renderer to be used.
      pad : float
          Padding between the figure edge and the edges of subplots, as a
          fraction of the font-size.
      h_pad, w_pad : float, optional
          Padding (height/width) between edges of adjacent subplots.
          Defaults to *pad*.
      rect : tuple (left, bottom, right, top), default: None
          (left, bottom, right, top) rectangle in normalized figure
          coordinates that the whole subplots area (including labels) will
          fit into. Default (None) is the whole figure.
      """
      if renderer is None:
          renderer = figure._get_renderer()
      kwargs = _tight_layout.get_tight_layout_figure(
          figure,
          figure.axes,
          _tight_layout.get_subplotspec_list(
              figure.axes, grid_spec=self
          ),
          renderer,
          pad=pad,
          h_pad=h_pad,
          w_pad=w_pad,
          rect=rect,
      )
      if kwargs:
          self.update(**kwargs)
  
imports: import copy
  import logging
  from numbers import Integral
  import numpy
  import matplotlib
  from matplotlib import _api, _pylab_helpers, _tight_layout
  from matplotlib.transforms import Bbox
label_desc: Use image node_id 5 for calling the GridSpec obj's underlying member method code with example usage: obj.tight_layout(figure, renderer, pad, h_pad, w_pad, rect) without return types