Try with this:
#Code
ggplot(A1, aes(x = PopMns, y = Freq)) +
geom_point() +
stat_smooth(method = "lm", col = "red",se=F) +
stat_smooth(method = "lm", col = "blue",formula = y~poly(x,2),se=F) +
geom_line()
This results in the following
Is there a way to have the scatter points instead of the black line?
Update: Try this, using your data:
library(ggplot2)
#Code
ggplot(A1, aes(x = PopMns, y = Freq)) +
geom_point() +
stat_smooth(method = "lm", col = "red",se=F) +
stat_smooth(method = "lm", col = "blue",se=F,formula = y~poly(x,2))
Output:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…