Get startedGet started for free

Density plots

Now you'll be making a third type of graph: a density plot. This type of plot allows us to visualize a distribution in a somewhat detailed way. You'll make two density plots using the People dataset; one for Height and one for Weight.

plotnine has been imported as p9.

This exercise is part of the course

Performing Experiments in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Create density plot of Height
____(p9.ggplot(____)+ p9.____(x=____, fill=____)+ p9.____(alpha=0.5))
Edit and Run Code