add colorbar to 2d hist

Solutions on MaxInterview for add colorbar to 2d hist by the best coders in the world

showing results for - "add colorbar to 2d hist"
Isabel
07 Jun 2016
1fig, ax = plt.subplots()
2h = ax.hist2d(x, y, bins=40, norm=LogNorm())
3fig.colorbar(h[3], ax=ax)
similar questions
queries leading to this page
add colorbar to 2d hist