Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the font size in a seaborn corrplot

My question is how to change the size of font in seaborn using correlation matrix I don't know why somehow the font is too large for mesee blow

like image 687
MYjx Avatar asked Dec 11 '22 04:12

MYjx


1 Answers

if you already have the correlation values in your data, you can use a heatmap and set up the size with "annot_kws", for example here setting it to 8.

sns.heatmap(data, vmin=data.values.min(), vmax=1, square=True, 
        linewidths=0.1, annot=True, annot_kws={"size":8})

and it would look like this:

enter image description here

like image 94
Gabriel Avatar answered Mar 12 '23 16:03

Gabriel