I've a column of a dataset like : [1, 2, 1, 1, 1, 1, 2, 2, ...] where 1 is male and 2 female.
What I want is to create a plot like the one in the pictures but I couldn't.
ggplot( aes(x=age)) +
geom_density(fill="#69b3a2", color="#e9ecef", alpha=0.8)
I don't know how to put instead of the range [-0.5, 0.5] for male, indicates male, and [0.5, 1.5] female.

