I am trying to draw a line with smoothed values.
my code is:
library(MASS)
ggplot(data=mcycle) +
aes(x=times, y= accel) +
geom_point(aes(x=times, y=accel),shape=1) +
geom_smooth(loess) +
theme_minimal()
what I am trying to do;
what I get instead;



geom_smooth(span=0.5)