I have a geom_area graph that looks like this: 
I want to color everything above the x axis and everything under the red x axis. I have a category column in my data that contains the row “positive” for all positive values and “negative” for all negative values, so I tried just doing fill = category and using scale_fill_manual to set positive to green and negative to red. but this gives me the following: 
Green above x looks correct, but red below the axis is incorrect. I checked my data and there are no negative data points where it dyes red after October 20th and use geom_point instead, I get the correct colors.
Here is an example of my data:
created score category 2011-10-19 21:26:19 2 positive 2011-10-19 22:50:33 -2 negative 2011-10-20 15:12:38 -2 negative 2011-10-20 17:19:24 -2 negative 2011-10-20 22:12:44 2 positive 2011-10-20 22:16:57 4 positive 2011-10-21 08:22:53 2 positive
and here is the code that I use to make the plot:
ggplot(data = df, aes(x = created, y = score, colour = category)) + geom_point(aes(fill = category)) + scale_fill_manual(values = c("positive" = "green", "negative" = "red"))
My problem might be related to this previous question .
source share