class_docstr: Plot a group of elements in a grid layout based on a GridSpace element
  object.
class_docstr_tok: ["Plot","a","group","of","elements","in","a","grid","layout","based","on","a","GridSpace","element","object","."]
code: def __init__(self, layout, ranges=None, layout_num=1, **params):
      if not isinstance(layout, GridSpace):
          raise Exception("GridPlot only accepts GridSpace.")
      super().__init__(
          layout=layout, layout_num=layout_num, ranges=ranges, **params
      )
      self.cols, self.rows = layout.shape
      self.subplots, self.layout = self._create_subplots(layout, ranges)
  
      if self.top_level:
          self.traverse(
              lambda x: attach_streams(self, x.hmap, 2),
              [GenericElementPlot],
          )
  
imports: import param
  from holoviews.plotting.util import attach_streams
  from ...core import AdjointLayout, Empty, GridMatrix, GridSpace, HoloMap, NdLayout
  from ...core.options import Store
  from ...core.util import wrap_tuple
  from ...element import Histogram
  from ..plot import CallbackPlot, DimensionedPlot, GenericAdjointLayoutPlot, GenericCompositePlot, GenericElementPlot, GenericLayoutPlot
  from .util import configure_matching_axes_from_dims, figure_grid
label_desc: Use image node_id 1 to create a new GridPlot object from inherited base classes: PlotlyPlot, GenericCompositePlot with example: obj = GridPlot(layout, ranges, layout_num)