I am creating a heatmap with sns.heatmap() but couldn't find a way to set the size of the labels inside the boxes when we set annot=True, is it possible to make the font smaller ?
Thanks
Use the annot_kws parameter, e.g.
sns.heatmap(x, annot=True, annot_kws={"size": 20})
of course !
Thanks
Is there any simple way to make the those columns' name on both axes bigger and rotate those on the x-axis?
I could use sns.set(font_scale=1.8) to change the font size but then I have to pass annot_kws={"size": 20} argument to keep the annot small, so I wonder if there is an easy way to do that and rotate as well.
sns.set(font_scale=1.8) woked thanks
Can we have different colours for the xticklabels?
@siddhant-doshi
you can simply use matplotlib axes methods for it.
import numpy as np; np.random.seed(0)
import seaborn as sns; sns.set_theme()
uniform_data = np.random.rand(10, 12)
ax = sns.heatmap(uniform_data)
ax.tick_params(axis='x', colors='red')

Most helpful comment
Use the
annot_kwsparameter, e.g.