Reputation: 1
I have added a reproducible example for my previous question.
I'm trying to get a plot similar to this:
library(ggplot2)
Date <- as.numeric(rep(seq(2000:2005), each = 5))
value <- runif(30,0,100)
group <- rep(LETTERS[1:5],times = 6)
data <- data.frame(Date,value,group)
ggplot(data, aes(x = Date, y = value, fill = group)) +
geom_area()
Upvotes: 0
Views: 38
Reputation: 942
Do I understand correctly that you want the areas to overlap instead of getting stacked?
Is this what you want?
ggplot(data, aes(x = Date, y = value, fill = group)) +
geom_area(position = "identity", alpha = 0.5)
Upvotes: 1