Search⌘ K
AI Features

Categorical Distribution Plots

Explore how to create and interpret categorical distribution plots in Python using Seaborn. Understand boxplots, violin plots, and boxenplots, including how quartiles and outliers are shown. Learn to add detail with the hue parameter for clearer data comparisons and decide which plot suits your audience's needs.

Different distribution plots can be used to show observations across levels of a categorical variable. The following examples show additional plot types.

The boxplot()

These types of plots are used to show the distribution of categorical data. A box plot (also known as a box-and-whisker plot) shows the distribution of quantitative data in a way that facilitates comparisons between variables or across levels of a categorical variable.

The box shows the quartiles of the data set, while the whiskers extend to show the rest of the distribution, except those points that are determined to be outliers. Outliers are determined by a method that’s a function of the inter-quartile range.

In statistics, the quartiles of a ranked set of data values are the three points that divide the data set into four equal groups, with each group comprising a quarter of the data. A quartile is a type of quantile that ...