Change the font size of labels in sns.heatmap

my code is as following:

fig, ax = plt.subplots()
st.write('1.3')
sns.set(font_scale=1.3)
sns.heatmap(df_.corr(),annot=True, annot_kws={'size': 0.01},cmap='BrBG')
 #plt.xlabel('Mathematical Expression', fontsize=1)
 st.write(fig)

really the size of x and y labels is so big i change the parameter font_scale but not working well for me

my question is: how can i change the labels font size?

thanks in advance

sns.set(font_scale=1.3) does change the x and y labels font size. I am not sure what you mean by β€œnot working well for me” but if you think the labels are too big, making them bigger is not going to help.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.