Answers for "add colorbar to 2d hist"

0

add colorbar to 2d hist

fig, ax = plt.subplots()
h = ax.hist2d(x, y, bins=40, norm=LogNorm())
fig.colorbar(h[3], ax=ax)
Posted by: Guest on May-17-2021

Python Answers by Framework

Browse Popular Code Answers by Language