atompy.Hist2d.for_pcolormesh#

property Hist2d.for_pcolormesh#

Return such that it can be plotted using matplotlib.pyplot.pcolormesh

The input order for pcolormesh is xedges, yedges, H.T

Returns:
xedgesndarray
yedgesndarray
H.Tndarray

Transposed matrix of input Hist2d.H

Examples

hist = Hist2d(*np.histogram2d(xsamples, ysamples))
plt.pcolormesh(*hist.for_pcolormesh)