Back to Seaborn

Set Style

doc/_docstrings/set_style.ipynb

0.13.2409 B
Original Source
python
import seaborn as sns

Call the function with the name of a seaborn style to set the default for all plots:

python
sns.set_style("whitegrid")
sns.barplot(x=["A", "B", "C"], y=[1, 3, 2])

You can also selectively override seaborn's default parameter values:

python
sns.set_style("darkgrid", {"grid.color": ".6", "grid.linestyle": ":"})
sns.lineplot(x=["A", "B", "C"], y=[1, 3, 2])