I am trying to add geom_line to only one of my facet grids. The code below puts the line on both plots
...r
tiff("RBbBriph.tif", width = 1049, height = 268, units = "px")
xph <- df %>%
select(c(NST_DATI,PH,STAGE))%>%
gather(variable, value,-NST_DATI)
ggplot(data = xph, aes(x = NST_DATI, y = value, colour = variable)) +
geom_line()+
stat_smooth(colour = "gray50") +
facet_grid(variable~.,scales="free_y", labeller = labeller(variable=labels))+
labs(x="Date",y="Measurement",colour="Paremeters",title = "RBbB",subtitle = "pH")+
testing horizontal lines
geom_hline(data= xph, aes(yintercept=6.56), colour="purple", linetype=2)+
End testing horizontal lines
theme(legend.position = "none")
dev.off()
...