Back to Numerical Arrays (NumPy)

np.histogram2d

Compute the bi-dimensional histogram of two data samples.

Syntax

np.histogram2d(x, y, bins?, range?, density?, weights?)

Description

Compute the bi-dimensional histogram of two data samples.

Parameters

NameDescription
x- Array of x coordinates
y- Array of y coordinates
bins(optional)- Number of bins or [nx, ny] or [xedges, yedges] (default: 10)
range(optional)- [[xmin, xmax], [ymin, ymax]]
density(optional)- If true, return probability density (default: false)
weights(optional)- Weights for each sample

Returns

Promise<Histogram2DResult>