First I loaded ggplot and added mtcars library to explain.
library(ggplot2)
cars <- mtcars
This is a normal ggplot graph with geom_smooth and the confidence interval.
ggplot(cars, aes(x = mpg, y= disp)) + geom_point() + geom_smooth()
within geom_smooth is an option se which is your confidence interval. se is default set to TRUE by setting se to FALSE it removes the confidence interval.
ggplot(cars, aes(x = mpg, y= disp)) + geom_point() + geom_smooth(se = FALSE)
for other geom_smooth options see
?geom_smooth
I Hope this helps!
4
solved How could I get a graph have a shade (confidence interval), legend have no a shade [closed]