0

I am trying to create a plot similar to the following:

enter image description here

Using the same aesthetics - i.e. a thick green line running along the top and then go from green to white below the plot using geom_area().

How can I gradually chnage the colour from green to white?

Data / code

data.frame(
  days = rep(1:100),
  values = cumsum(rnorm(mean = 0, sd = 1, n = 100))
) %>% 
  ggplot(aes(x = days, y = values)) +
  geom_line() +
  geom_area(position=position_identity())

My current plot looks like:

enter image description here

user113156
  • 6,761
  • 5
  • 35
  • 81

0 Answers0