I'm currently creating several plots with ggplot where I fit a linear regression.
format.multi2<-theme_bw() +
theme(axis.line=element_line(colour="black"),
axis.text=element_text(size=14, colour="black"),
axis.title=element_text(size=16, colour="black"),
panel.grid=element_blank(),
panel.border=element_blank(),
plot.margin=unit(c(.3,.3,.4,.4), "cm"))
ggplot(bank.multi2, aes(x=d2H2, y=d2H1)) +
geom_point(size=2) +
geom_smooth(method='lm', se=FALSE, colour="black") +
labs(y=expression(paste(paste(delta^2,"H")[t+x])),
x=expression(paste(paste(delta^2,"H")[t]))) +
xlim(min(bank.multi$d2H), max(bank.multi$d2H)) +
ylim(min(bank.multi$d2H), max(bank.multi$d2H)) +
format.multi2
This results in a plot that looks like this:
I'd like to visually compare the slope of the regression to another line with a slope of 1 and an intercept of 0 with "error bars" (or a ribbon) on either side that covers slopes ranging from 0.9 to 1.1. Does anyone have an idea of how to add this to my plots?