Compute the bi-dimensional histogram of two data samples.
Parameters : | x : array_like, shape(N,)
y : array_like, shape(M,)
bins : int or [int, int] or array_like or [array, array], optional
range : array_like, shape(2,2), optional
normed : bool, optional
weights : array_like, shape(N,), optional
|
---|---|
Returns : | H : ndarray, shape(nx, ny)
xedges : ndarray, shape(nx,)
yedges : ndarray, shape(ny,)
|
See also
Notes
When normed is True, then the returned histogram is the sample density, defined such that:
where H is the histogram array and
the area of bin {i,j}.
Please note that the histogram does not follow the Cartesian convention where x values are on the abcissa and y values on the ordinate axis. Rather, x is histogrammed along the first dimension of the array (vertical), and y along the second dimension of the array (horizontal). This ensures compatibility with histogramdd.
Examples