matplotlib.pyplot.
hist2d
(x, y, bins=10, range=None, density=False, weights=None, cmin=None, cmax=None, *, data=None, **kwargs)[source]¶
Make a 2D histogram plot.
Parameters:Input values
The bin specification:
- If int, the number of bins for the two dimensions (nx=ny=bins).
- If
[int, int]
, the number of bins in each dimension (nx, ny = bins).- If array_like, the bin edges for the two dimensions (x_edges=y_edges=bins).
- If
[array, array]
, the bin edges in each dimension (x_edges, y_edges = bins).
The default value is 10.
The leftmost and rightmost edges of the bins along each dimension (if not specified explicitly in the bins parameters): [[xmin, xmax], [ymin, ymax]]
. All values outside of this range will be considered outliers and not tallied in the histogram.
Normalize histogram. normed is a deprecated synonym for this parameter.
An array of values w_i weighing each sample (x_i, y_i).
All bins that has count less than cmin will not be displayed and these count values in the return value count histogram will also be set to nan upon return
All bins that has count more than cmax will not be displayed (set to none before passing to imshow) and these count values in the return value count histogram will also be set to nan upon return
The bi-dimensional histogram of samples x and y. Values in x are histogrammed along the first dimension and values in y are histogrammed along the second dimension.
The bin edges along the x axis.
The bin edges along the y axis.
QuadMesh
A colors.Colormap
instance. If not set, use rc settings.
A colors.Normalize
instance is used to scale luminance data to [0, 1]
. If not set, defaults to colors.Normalize()
.
Arguments passed to the Normalize
instance.
0 <= scalar <= 1
or None
, optional
The alpha blending value.
See also
hist
Notes
hist2d
calculates it's own axis limits, and any limits previously set are ignored.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>]:
Objects passed as data must support item access (data[<arg>]
) and membership test (<arg> in data
).
matplotlib.pyplot.hist2d
¶
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4