Seaborn's attractive defaults come from its theming system. One call configures the look of every chart — background style, scale for the medium, and colour palette.
set_theme
sns.set_theme(style="whitegrid", palette="deep", context="notebook")# style → background: darkgrid, whitegrid, dark, white, ticks# context → scale for medium: paper < notebook < talk < poster# palette → default colour set
Style vs context
Style controls the aesthetic (grid, background); context scales fonts and line widths for where the chart will be seen — bump it up to "talk" for slides so text is readable from the back of a room.
Key takeaways
- 01sns.set_theme(style=, context=, palette=) configures the global look in one call.
- 02style sets the background/grid; context scales fonts/lines for the medium.
- 03context goes paper < notebook < talk < poster — bump it up for slides.
- 04Set the theme once at the top; all charts inherit it.
