code: def image(h2: Histogram2D, ax: Axes, *, show_colorbar: bool = True, interpolation: str = "nearest", **kwargs):
      
      cmap = _get_cmap(kwargs)   # h2 as well?
      data = get_data(h2, cumulative=False, density=kwargs.pop("density", False))
      norm, cmap_data = _get_cmap_data(data, kwargs)
      # zorder = kwargs.pop("zorder", None)
  
      for binning in h2._binnings:
          if not binning.is_regular():
              raise RuntimeError(
                  "Histograms with irregular bins cannot be plotted using image method.")
  
      kwargs["interpolation"] = interpolation
      if kwargs.get("xscale") == "log" or kwargs.get("yscale") == "log":
          raise RuntimeError("Cannot use logarithmic axes with image plots.")
  
      _apply_xy_lims(ax, h2, data=data, kwargs=kwargs)
  
      _add_labels(ax, h2, kwargs)
      ax.imshow(data.T[::-1, :], cmap=cmap, norm=norm,
                extent=(h2.bins[0][0, 0], h2.bins[0][-1, 1],
                        h2.bins[1][0, 0], h2.bins[1][-1, 1]),
                aspect="auto", **kwargs)
  
      if show_colorbar:
          _add_colorbar(ax, cmap, cmap_data, norm)
docs: Plot of 2D histograms based on pixmaps.
  
      Similar to map, but it:
      - has fewer options
      - is much more effective (enables thousands)
      - does not support irregular bins
  
      Parameters
      ----------
      interpolation: interpolation parameter passed to imshow, default: "nearest" (creates rectangles)