I have a data frame with a titration curve of pH, function of volume. I would like to put two colored/shadowed horizontal rectangles to show the range of pH of two indicators, methyl orange (3.2
Here is a reproducible exemple :
Volume <- c(1:5)
pH <- c(3,4,9,10,12)
df <- data.frame(Volume,pH)
ggplot(df,aes(x=Volume,y=pH))+geom_line(color="purple")+
geom_rect(aes(ymin=3.2,ymax=4.4,xmin=-Inf,xmax=Inf))+
geom_rect(aes(ymin=8.2,ymax=10,xmin=-Inf,xmax=Inf))+
scale_fill_manual(values = alpha(c("orange", "pink"),alpha = .3))
Which gives me this result :
How can theses rectangles be orange, pink and shadowed ?

