Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

seaborn how to set style and font size

I am trying to change both style and font size like this

sns.set_style("whitegrid")  

sns.set(font_scale=1.5)

But it seems that both are mutually exclusive. I can use only one of the lines at a time. How to make both changes apparent?

like image 625
LetzerWille Avatar asked Jan 28 '23 01:01

LetzerWille


1 Answers

Put them both in the same seaborn.set command:

sns.set(style="whitegrid", font_scale=1.5)

As per the docs, seaborn.set is an alias for seaborn.set_theme

seaborn.set_theme(style="whitegrid", font_scale=1.5)
like image 137
ImportanceOfBeingErnest Avatar answered Mar 03 '23 03:03

ImportanceOfBeingErnest