class_docstr: Plot a group of elements in a grid layout based on a GridSpace element
  object.
code: def __init__(
      self,
      layout,
      axis=None,
      create_axes=True,
      ranges=None,
      layout_num=1,
      keys=None,
      **params,
  ):
      if not isinstance(layout, GridSpace):
          raise Exception("GridPlot only accepts GridSpace.")
      super().__init__(
          layout,
          layout_num=layout_num,
          ranges=ranges,
          keys=keys,
          **params,
      )
      # Compute ranges layoutwise
      grid_kwargs = {}
      if axis is not None:
          bbox = axis.get_position()
          l, b, w, h = bbox.x0, bbox.y0, bbox.width, bbox.height
          grid_kwargs = {
              "left": l,
              "right": l + w,
              "bottom": b,
              "top": b + h,
          }
          self.position = (l, b, w, h)
  
      self.cols, self.rows = layout.shape
      self.fig_inches = self._get_size()
      self._layoutspec = gridspec.GridSpec(
          self.rows, self.cols, **grid_kwargs
      )
  
      with mpl.rc_context(rc=self.fig_rcparams):
          (
              self.subplots,
              self.subaxes,
              self.layout,
          ) = self._create_subplots(layout, axis, ranges, create_axes)
      if self.top_level:
          self.traverse(
              lambda x: attach_streams(self, x.hmap, 2),
              [GenericElementPlot],
          )
  
imports: from contextlib import contextmanager
  from itertools import chain
  import matplotlib
  import numpy
  import param
  from matplotlib import animation, gridspec, pyplot, rcParams
  from matplotlib.font_manager import font_scalings
  from mpl_toolkits.mplot3d import Axes3D
  from ...core import AdjointLayout, Collator, CompositeOverlay, Element, Empty, GridMatrix, GridSpace, HoloMap, Layout, NdLayout
  from ...core.options import SkipRendering, Store
  from ...core.util import int_to_alpha, int_to_roman, wrap_tuple_streams
  from ..plot import DimensionedPlot, GenericAdjointLayoutPlot, GenericCompositePlot, GenericElementPlot, GenericLayoutPlot
  from ..util import attach_streams, collate, displayable
  from .util import compute_ratios, fix_aspect, get_old_rcparams
label_desc: Use image node_id 1 to create a new GridPlot object from inherited base classes: CompositePlot with example: obj = GridPlot(layout, axis, create_axes, ranges, layout_num, keys)