class_docstr: RasterGridPlot evenly spaces out plots of individual projections on
  a grid, even when they differ in size. Since this class uses a single
  axis to generate all the individual plots it is much faster than the
  equivalent using subplots.
class_docstr_tok: ["RasterGridPlot","evenly","spaces","out","plots","of","individual","projections","on","a","grid",",","even","when","they","differ","in","size",".","Since","this","class","uses","a","single","axis","to","generate","all","the","individual","plots","it","is","much","faster","than","the","equivalent","using","subplots","."]
code: def update_frame(self, key, ranges=None):
      grid = self._get_frame(key)
      ranges = self.compute_ranges(self.layout, key, ranges)
      for xkey in self._xkeys:
          for ykey in self._ykeys:
              plot = self.handles["projs"][(xkey, ykey)]
              grid_key = (
                  (xkey, ykey) if self.layout.ndims > 1 else (xkey,)
              )
              element = grid.data.get(grid_key, None)
              if element:
                  plot.set_visible(True)
                  img = (
                      element.values()[0]
                      if isinstance(element, CompositeOverlay)
                      else element
                  )
                  data = get_raster_array(img)
                  plot.set_data(data)
              else:
                  plot.set_visible(False)
  
      kwargs = self._get_axis_kwargs()
      return self._finalize_axis(key, ranges=ranges, **kwargs)
  
imports: import sys
  import numpy
  import param
  from packaging.version import Version
  from ...core import CompositeOverlay, Element, traversal
  from ...core.util import isfinite, match_spec, max_range, unique_iterator
  from ...element.raster import RGB, Image, Raster
  from ..util import categorical_legend
  from .chart import PointPlot
  from .element import ColorbarPlot, ElementPlot, LegendPlot, OverlayPlot
  from .plot import GridPlot, MPLPlot, mpl_rc_context
  from .util import get_raster_array, mpl_version
label_desc: Use image node_id 6 for calling the RasterGridPlot obj's underlying member method code with example usage: obj.update_frame(key, ranges) and returns: self