I'm trying to combine multiple density plots with overlay.
ggplot and geom_density do the job, but the densities are stacked on top of each other.
ggplot(all.complete, aes(x=humid_temp)) +
geom_density(aes(group=height, colour=height, fill=height.f, alpha=0.1)) +
guides(fill = guide_legend(override.aes = list(colour = NULL))) +
labs(main="Temperature by Height", x="Temperature", y="Density")
Something similar to this is what I'm trying to achieve:
In my case, the years would be substituted by height.
Thanks!!!