Visualization with Strip Plots
Explore how to use Seaborn's strip plots to visualize the distribution of numerical data across categories. Learn to customize plots by adjusting jitter, point size, transparency, and hue. Understand how to overlay strip plots on box and violin plots to enhance data interpretation.
We'll cover the following...
Overview
A strip plot is a categorical scatter plot, where one variable is numeric, and the other is categorical. It’s similar to a swarm plot; we represent data values as circular dots on both swarm and strip plots. The primary distinction is that the data points in a swarm plot do not overlap. On the other hand, the points in a strip plot may overlap.
Plotting a strip plot
In this lesson, we’ll use the “penguins” dataset. It has been loaded into the DataFrame penguins_df after removing the null values. Let’s begin our visualizations. We pass x='sex' and y='body_mass_g' in the sns.stripplot() function to see the variation in body mass between male and female penguins.
We can observe from the plot above that most male penguins have a higher body_mass_g ...