Box plots

Understanding Data Visualization

Richie Cotton

Data Evangelist at DataCamp

You can't just color in histograms

A histogram of the age at start of rule for English kings and queens, colored by royal houses. It looks like a blob monster from a 1980s video game.

Understanding Data Visualization

Draw each histogram in its own panel

A histogram of the age at start of rule for English kings and queens, with separate panels for each royal house.

Understanding Data Visualization

Draw each histogram in its own panel

A histogram of the age at start of rule for English kings and queens, with separate panels for each royal house. The left column of panels is highlighted.

Understanding Data Visualization

Draw each histogram in its own panel

A histogram of the age at start of rule for English kings and queens, with separate panels for each royal house. The Lancaster and York houses are highlighted.

Understanding Data Visualization

A histogram of the age at start of rule for English kings and queens, with separate panels for each royal house. The panels are stacked vertically in a single column, making the plot tall and narrow.

Understanding Data Visualization

When should you use a box plot?

  1. When you have a continuous variable, split by a categorical variable.
  2. When you want to compare the distributions of the continuous variable for each category.
Understanding Data Visualization

Histogram vs. box plot

A histogram of the age of start of rule of kings and queens.

A box plot of the age of start of rule of kings and queens.

Understanding Data Visualization

Histogram vs. box plot: mid-line

A histogram of the age of start of rule of kings and queens.

A box plot of the age of start of rule of kings and queens. The plot is annotated with the mid line at the median.

Understanding Data Visualization

Histograms vs. box plot: the box

A histogram of the age of start of rule of kings and queens.

A box plot of the age of start of rule of kings and queens. The plot is annotated with the box sides running from the lower quartile to the upper quartile, and the inter-quartile range being the difference between these.

Understanding Data Visualization

Histograms vs. box plots: the whiskers

A histogram of the age of start of rule of kings and queens.

A box plot of the age of start of rule of kings and queens. The plot is annotated with the whiskers running from the box sides to the lowest and highest non-extreme values.

Understanding Data Visualization

Monarchs by house

Box plots of the age of start of rule of kings and queens, one for each royal house.

Understanding Data Visualization

Let's practice!

Understanding Data Visualization

Preparing Video For Download...