I would like to create a stacked chart using the ggplot2 library in R to create shaded areas (for Bananas and Kiwi). The problem is that data (Bananas, Kiwi) comes from two separate functions, thus there are two data objects.
plot(t, Bananas, type="l", xlab = "",xlim=c(0,70), ylim=c(0,1) lty=1)
lines(t, Kiwi, lty=2)
How can I implement two "data" objects in the ggplot?
p <- ggplot(data= , aes(x= t, group=, fill=)) + geom_density(adjust=1.5, position="fill") +
theme_ipsum()