pygram11.var2d

pygram11.var2d(x, y, xbins, ybins, weights=None)[source]

Histogram the x, y data with variable width binning.

Parameters
  • x (array_like) – first entries in the data pairs to histogram

  • y (array_like) – second entries in the data pairs to histogram

  • xbins (array_like) – bin edges for the x dimension

  • ybins (array_like) – bin edges for the y dimension

  • weights (array_like, optional) – weights for each \((x_i, y_i)\) pair.

Returns

Examples

A histogram of (x, y) where the edges are defined by a numpy.logspace() in both dimensions:

>>> bins = numpy.logspace(0.1, 1.0, 10, endpoint=True)
>>> h, __ = var2d(x, y, bins, bins)