Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add colorbar to 2d hist

fig, ax = plt.subplots()
h = ax.hist2d(x, y, bins=40, norm=LogNorm())
fig.colorbar(h[3], ax=ax)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #add #colorbar #hist
ADD COMMENT
Topic
Name
4+8 =