class_docstr: GridSpec whose subplot layout parameters are inherited from the
  location specified by a given SubplotSpec.
class_docstr_tok: ["GridSpec","whose","subplot","layout","parameters","are","inherited","from","the","location","specified","by","a","given","SubplotSpec","."]
docstr: Parameters
  ----------
  nrows, ncols : int
      Number of rows and number of columns of the grid.
  subplot_spec : SubplotSpec
      Spec from which the layout parameters are inherited.
  wspace, hspace : float, optional
      See `GridSpec` for more details. If not specified default values
      (from the figure or rcParams) are used.
  height_ratios : array-like of length *nrows*, optional
      See `GridSpecBase` for details.
  width_ratios : array-like of length *ncols*, optional
      See `GridSpecBase` for details.
code: def __init__(
      self,
      nrows,
      ncols,
      subplot_spec,
      wspace=None,
      hspace=None,
      height_ratios=None,
      width_ratios=None,
  ):
      """
      Parameters
      ----------
      nrows, ncols : int
          Number of rows and number of columns of the grid.
      subplot_spec : SubplotSpec
          Spec from which the layout parameters are inherited.
      wspace, hspace : float, optional
          See `GridSpec` for more details. If not specified default values
          (from the figure or rcParams) are used.
      height_ratios : array-like of length *nrows*, optional
          See `GridSpecBase` for details.
      width_ratios : array-like of length *ncols*, optional
          See `GridSpecBase` for details.
      """
      self._wspace = wspace
      self._hspace = hspace
      self._subplot_spec = subplot_spec
      self.figure = self._subplot_spec.get_gridspec().figure
      super().__init__(
          nrows,
          ncols,
          width_ratios=width_ratios,
          height_ratios=height_ratios,
      )
  
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 1 to create a new GridSpecFromSubplotSpec object from inherited base classes: GridSpecBase with example: obj = GridSpecFromSubplotSpec(nrows, ncols, subplot_spec, wspace, hspace, height_ratios, width_ratios)