Useful Options

In geom_smooth:

For more details, see ggplot2:Add a smoother

Examples using iris data

library(ggplot2)

p1 <- ggplot(iris, aes(Petal.Width, Petal.Length, colour = Species)) + 
  geom_point(size = 3) + geom_smooth(method='lm') + 
  labs(x = "Petal Width", y = "Petal Length") + theme_bw() +
  theme(legend.position = "top", legend.text = element_text(size = 12), 
        legend.title = element_text(size = 14))

#print(p1)

Figure1

Do not show the confidence intervals:

p2 <- ggplot(iris, aes(Petal.Width, Petal.Length, colour = Species)) + 
  geom_point(size = 3) + geom_smooth(method='lm', se = FALSE) + 
  labs(x = "Petal Width", y = "Petal Length") + theme_bw() +
  theme(legend.position = "top", legend.text = element_text(size = 12), 
        legend.title = element_text(size = 14))

#print(p2)

Figure2

Extend the fit span to full range:

p3 <- ggplot(iris, aes(Petal.Width, Petal.Length, colour = Species)) + 
  geom_point(size = 3) + geom_smooth(method='lm', fullrange = TRUE) + 
  labs(x = "Petal Width", y = "Petal Length") + theme_bw() +
  theme(legend.position = "top", legend.text = element_text(size = 12), 
        legend.title = element_text(size = 14))

#print(p3)

Figure3

The plot above shows that the standard error gets larger as the X variable moves farther away from its mean.