class_docstr: A class that specifies the geometry of the grid that a subplot
  will be placed. The location of grid is determined by similar way
  as the SubplotParams.
class_docstr_tok: ["A","class","that","specifies","the","geometry","of","the","grid","that","a","subplot","will","be","placed",".","The","location","of","grid","is","determined","by","similar","way","as","the","SubplotParams","."]
docstr: Adjust subplot parameters to give specified padding.
  
  Parameters
  ----------
  
  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_inches``.
  rect : tuple of 4 floats, optional
      (left, bottom, right, top) rectangle in normalized figure
      coordinates that the whole subplots area (including labels) will
      fit into.  Default is (0, 0, 1, 1).
docstr_tok: ["Adjust","subplot","parameters","to","give","specified","padding",".","Parameters","--","--","--","--","--","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_inches","``",".","rect",":","tuple","of","4","floats",",","optional","(","left",",","bottom",",","right",",","top",")","rectangle","in","normalized","figure","coordinates","that","the","whole","subplots","area","(","including","labels",")","will","fit","into",".","Default","is","(","0",",","0",",","1",",","1",")","."]
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
      ----------
  
      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_inches``.
      rect : tuple of 4 floats, optional
          (left, bottom, right, top) rectangle in normalized figure
          coordinates that the whole subplots area (including labels) will
          fit into.  Default is (0, 0, 1, 1).
      """
  
      subplotspec_list = tight_layout.get_subplotspec_list(
          figure.axes, grid_spec=self
      )
      if None in subplotspec_list:
          warnings.warn(
              "This figure includes Axes that are not compatible "
              "with tight_layout, so results might be incorrect."
          )
  
      if renderer is None:
          renderer = tight_layout.get_renderer(figure)
  
      kwargs = tight_layout.get_tight_layout_figure(
          figure,
          figure.axes,
          subplotspec_list,
          renderer,
          pad=pad,
          h_pad=h_pad,
          w_pad=w_pad,
          rect=rect,
      )
      self.update(**kwargs)
  
imports: from __future__ import absolute_import, division, print_function
  import six
  import copy
  import logging
  import warnings
  import numpy
  import matplotlib
  from matplotlib import _pylab_helpers, tight_layout, rcParams
  from matplotlib.transforms import Bbox
  import matplotlib._layoutbox
  from matplotlib.cbook import mplDeprecation
label_desc: Use image node_id 7 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