Here is my question:
I plot 7 variable's coefficient using sns.clustermap()
figure here:
http://i4.tietuku.com/ab10ee8d1983361f.png
label='big
==> no effect http://i11.tietuku.com/5068224d5bbc7c00.png
My code:
ds = pd.read_csv("xxxx.csv") corr = ds.corr().mul(100).astype(int) cmap = sns.diverging_palette(h_neg=210, h_pos=350, s=90, l=30, as_cmap=True) sns.clustermap(data=corr_s, annot=True, fmt='d',cmap = "Blues",annot_kws={"size": 16},)
This is one of the easiest methods to change the font size of any Seaborn legends, in this we just have to pass the parameter of the fontsize which allows us to pass the font-size value and it will change the font size.
Consider calling sns.set(font_scale=1.4)
before plotting your data. This will scale all fonts in your legend and on the axes.
My plot went from this,
To this,
Of course, adjust the scaling to whatever you feel is a good setting.
Code:
sns.set(font_scale=1.4) cmap = sns.diverging_palette(h_neg=210, h_pos=350, s=90, l=30, as_cmap=True) sns.clustermap(data=corr, annot=True, fmt='d', cmap="Blues", annot_kws={"size": 16})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With