Python matplotlib decrease size of colorbar labels Python matplotlib decrease size of colorbar labels python python

Python matplotlib decrease size of colorbar labels


Aha! Found the answer here:

cbar.ax.tick_params(labelsize=10) 

P.S. Upvote that answer and give Paul some love!


If you are here because you're trying to increase font size, but some numbers disappear because of big size with the above answer, you can do

cbar = plt.colorbar()for t in cbar.ax.get_yticklabels():     t.set_fontsize(20)