A solution would be to use lines()
and have two predictions for both extremes of x
.
See this example:
x <- rnorm(20)
y <- 5 + 0.4*x + rnorm(20)/10
dt <- data.frame(x=x, y=y)
ols1 <- lm(y ~ x, data=dt)
nd <- data.frame(x=range(x)) ## generate new data with the two extremes of x
plot(x, y) ## original scatter plot
lines(nd$x, predict(ols1, newdata=nd), col='orange') ## line from two points
I hope that helps.