code: def hist2d(self, da, **kwargs):
          
          if self.value is None or self.value == 'counts':
              normed = False
          else:
              normed = True
          y = da.values
          x = da.coords[da.dims[0]].values
          counts, xedges, yedges = np.histogram2d(
              x, y, normed=normed, **kwargs)
          if self.value == 'counts':
              counts = counts / counts.sum().astype(float)
          return counts, xedges, yedges
docs: Make the two dimensional histogram
  
          Parameters
          ----------
          da: xarray.DataArray
              The data source