matplotlib.pyplot.
hist2d
(x, y, bins=10, range=None, normed=False, weights=None, cmin=None, cmax=None, hold=None, data=None, **kwargs)¶Make a 2D histogram plot.
Parameters: | x, y: array_like, shape (n, )
bins: [None | int | [int, int] | array_like | [array, array]]
range : array_like shape(2, 2), optional, default: None
normed : boolean, optional, default: False
weights : array_like, shape (n, ), optional, default: None
cmin : scalar, optional, default: None
cmax : scalar, optional, default: None
|
---|---|
Returns: | h : 2D array
xedges : 1D array
yedges : 1D array
image : AxesImage |
Other Parameters: | |
cmap : {Colormap, string}, optional
norm : Normalize, optional
vmin/vmax : {None, scalar}, optional
alpha :
|
See also
hist
Notes
Rendering the histogram with a logarithmic color scale is
accomplished by passing a colors.LogNorm
instance to
the norm keyword argument. Likewise, power-law normalization
(similar in effect to gamma correction) can be accomplished with
colors.PowerNorm
.
Note
In addition to the above described arguments, this function can take a data keyword argument. If such a data argument is given, the following arguments are replaced by data[<arg>]: