I am trying to make a density plot out of 4000 rows (height.values), with 4 different categories (height.ind). this is the code i used.
library(ggplot2)
plom %>%
ggplot(aes(x = height.values, color=height.ind)) +
geom_density() +
labs(title = "height alimony")
I am able to get a density plot but there are a lot of lines instead of the 4 i want.
Anyone has an idea to fix it?