I have the following code to produce a side by side scatter plots:
ggplot(data = dat, aes(x = xvar,y = yvar)) +
geom_point() +
facet_wrap(grpvar)
I would like to add reference line y=x to those paneled plots, but only go the error message with the following added code:
+ abline(intercept = 0, slope = 1)
Any advice how to do this with multiple plots in a panel? Thanks!!