The legend for the following plot is not showing. I would like 2 legend entries. One for purple and one for green.
library(ggplot2)
index <- c(1,2,3,4,5)
size <- c(10,20,25,40,45)
df <- data.frame(index, size)
p <- ggplot(df, aes(x=index, y=size, fill=size))
p +
geom_ribbon(aes(fill="dfg", ymin=size, ymax=df$size[nrow(df)]), fill="#BEAED4", alpha=0.2, color="#BEAED4") +
geom_area(aes(fill="abc"), fill="#84CA72", alpha=0.2, colour="#84CA72") +
scale_fill_manual(name="skdjf", breaks=c("abc", "dfg"), values=c("red", "blue"), labels = c("cat1", "cat2"))
PS: I tried a lot of stuff but can't seem to get it to work.