0Pricing
Data Science Academy · Lesson

Facets, Hue, and Style

Splitting plots by category.

One Chart, Many Slices

Sometimes one plot hides too much. Faceting splits your data into a grid of small charts, one per category, so each group gets its own view.

Encode Groups With hue

The lightest way to compare groups is color. hue maps a category to colors inside a single plot, no extra panels needed.

sns.scatterplot(data=df, x="x", y="y", hue="group")

All lessons in this course

  1. Why seaborn Over Raw matplotlib
  2. Distributions: hist, kde, box
  3. Relationships: scatter and line
  4. Facets, Hue, and Style
← Back to Data Science Academy