Skip to main content
Albero Academy

Themes & Aesthetics

Set a consistent look with set_theme, styles, contexts and palettes.

Foundations8 min

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

one call sets the look
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

  1. 01sns.set_theme(style=, context=, palette=) configures the global look in one call.
  2. 02style sets the background/grid; context scales fonts/lines for the medium.
  3. 03context goes paper < notebook < talk < poster — bump it up for slides.
  4. 04Set the theme once at the top; all charts inherit it.

Finished this chapter?

Mark it complete to track your progress through Seaborn.