I would like to create four boxplots next to each other. They should all filled with another color. I tried: scale_fill_manual(values=c("1"="red", "2"="green", "3"="yellow", "4"="blue"))
options(stringsAsFactors = FALSE)
input <- "C:\\statistical_tests\\boxplot.csv"
boxplot<- read.csv(input, sep=";")
library(ggplot2)
library(scales)
means <- aggregate(number ~ CPOD, paper, mean)
p <- ggplot(boxplot, aes(group=time,y=number, x=as.character(time))) +
geom_boxplot()+ theme_bw() +
scale_fill_manual(values=c("1"="red", "2"="green", "3"="yellow", "4"="blue"))+
panel.grid.minor=element_line(colour="white"),
axis.text.x = element_text(size=8, colour="black"),
axis.text.y=element_text(size=8, colour="black"))
print(p)
Unfortunately, it is not working. Could someone help me? Thank you very much!