BuildlyBuildly
DashboardExercisesProfileHelp
Data Science/Module 4: Data Visualization/Seaborn Distributions3/3
Exercise·7 min·10 XP

Compare Two Groups in One Histogram

Context. Daily step counts from users on two plans, Basic and Pro. Do Pro users actually move more? Overlay the two distributions to find out.

Your task. Write make_grouped_hist(df) that draws a seaborn histogram of steps with 4 bins, split by plan using hue, and returns the axes.

Example. hue="plan" colors each plan separately — and adds the legend for you.

Notes. No manual legend() call needed; seaborn builds it from the hue values.

Previous
Box Plot of Scores by Team
Next
Ad Spend vs Sales