import matplotlib.pyplot as plt
H, xedges, yedges = np.histogram2d(x_axis, y_axis, bins=10, weights=z_axis)
extent = [yedges[0], yedges[-1], xedges[-1], xedges[0]]
plt.imshow(H, extent=extent, interpolation='nearest')
plt.colorbar()
plt.show()
гистограмма numpy с 3 переменными