e15190.utilities.fast_histogram.plot_histo2d¶
- e15190.utilities.fast_histogram.plot_histo2d(hist_func, x, y, range, bins, **kwargs)¶
Plot a 2D histogram using
fast_histogram.- Parameters
hist_func (plt.hist2d() or ax.hist2d()) – The histogram function from matplotlib.
x (array-like, shape (N, )) – Data x to be histogrammed.
y (array-like, shape (N, )) – Data y to be histogrammed.
range (array-like, shape (2, 2)) – The x range and y range of the histogram,
[[xmin, xmax], [ymin, ymax]].bins ([int, int]) – The number of bins,
[x_bins, y_bins].**kwargs – Keyword arguments to be passed to
hist_func. See more at matplotlib.pyplot.hist2d.
- Returns
h (2D array of shape (bins[0], bins[1])) – The bin contents.
x_edges (1D array of shape (bins[0] + 1, )) – The bin edges along the x axis.
y_edges (1D array of shape (bins[1] + 1, )) – The bin edges along the y axis.
patches (histogram patches) – The histogram patches.