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: Return a dictionary of subplot layout parameters. The default
  parameters are from rcParams unless a figure attribute is set.
docstr_tok: ["Return","a","dictionary","of","subplot","layout","parameters",".","The","default","parameters","are","from","rcParams","unless","a","figure","attribute","is","set","."]
code: def get_subplot_params(self, figure=None, fig=None):
      """
      Return a dictionary of subplot layout parameters. The default
      parameters are from rcParams unless a figure attribute is set.
      """
      if fig is not None:
          warnings.warn(
              "the 'fig' kwarg is deprecated " "use 'figure' instead",
              mplDeprecation,
          )
      if figure is None:
          figure = fig
  
      if figure is None:
          kw = {
              k: rcParams["figure.subplot." + k]
              for k in self._AllowedKeys
          }
          subplotpars = mpl.figure.SubplotParams(**kw)
      else:
          subplotpars = copy.copy(figure.subplotpars)
  
      update_kw = {k: getattr(self, k) for k in self._AllowedKeys}
      subplotpars.update(**update_kw)
  
      return subplotpars
  
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 5 for calling the GridSpec obj's underlying member method code with example usage: obj.get_subplot_params(figure, fig) and returns: subplotpars