I have the following boxplots which I made from:
#Data
set.seed(395)
Env<- data.frame(CO2= c(cumsum(rnorm(1*36)), cumsum(rnorm(1*36))),
Group= rep(c("A","B"), each=36),
Segment=rep(seq(1,12),each=36))
ggplot(data=subset(Env, !is.na(Segment)),aes(factor(Segment),CO2))+
geom_boxplot()+
facet_wrap(~ Group)+
theme_bw()+
labs(x="Time segment", y="CO2")
I'd like to colour the 3rd, 9th and 12th boxplot a specific colour: green, red and purple. Is this possible?
I tried the following without success:
scale_fill_manual(values = c("", "","green","","","","","","red","","","purple"))
E.g. like this: