class_docstr: A base class of GridSpec that specifies the geometry of the grid
  that a subplot will be placed.
class_docstr_tok: ["A","base","class","of","GridSpec","that","specifies","the","geometry","of","the","grid","that","a","subplot","will","be","placed","."]
docstr: The number of rows and number of columns of the grid need to
  be set. Optionally, the ratio of heights and widths of rows and
  columns can be specified.
docstr_tok: ["The","number","of","rows","and","number","of","columns","of","the","grid","need","to","be","set",".","Optionally",",","the","ratio","of","heights","and","widths","of","rows","and","columns","can","be","specified","."]
code: def __init__(
      self, nrows, ncols, height_ratios=None, width_ratios=None
  ):
      """
      The number of rows and number of columns of the grid need to
      be set. Optionally, the ratio of heights and widths of rows and
      columns can be specified.
      """
      self._nrows, self._ncols = nrows, ncols
      self.set_height_ratios(height_ratios)
      self.set_width_ratios(width_ratios)
  
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 1 to create a new GridSpecBase object from inherited base classes: object with example: obj = GridSpecBase(nrows, ncols, height_ratios, width_ratios)