fix2d(x, y, bins=10, range=None, weights=None, flow=False)¶
ydata with fixed (uniform) binning.
The two input arrays (
y) must be the same length (shape).
x (numpy.ndarray) – First entries in data pairs to histogram.
y (numpy.ndarray) – Second entries in data pairs to histogram.
weights (array_like, optional) – The weights for data element. If weights are absent, the second return type will be
flow (bool) – Include over/underflow.
A histogram of (
y) with 20 bins between 0 and 100 in the
xdimention and 10 bins between 0 and 50 in the
>>> h, __ = fix2d(x, y, bins=(20, 10), range=((0, 100), (0, 50)))
The same data, now histogrammed weighted (via
>>> h, err = fix2d(x, y, bins=(20, 10), range=((0, 100), (0, 50)), weights=w)