I am having a problem where geom_smooth() is not working on my ggplot2. But instead of a smooth curve, there is a fold.
My X-axis variable is the factor variable(I've tried to convert it to a numerical variable, but it didn't work), and Y-axis is numeric variable. My data.frame is that

ggplot(tmp, aes(x = x, y = y))+ geom_point()+ geom_smooth(formula = y ~ x, method = "loess", stat = "identity", se = T, group = "") I hope to get a pic like this. 

stat = "identity"andgroup = ""stat = "identity"andgroup = " ", and doing that alone isn't producing the desired output shown in the question. Just pointing that out, and that can be verified using adfwith a similar structure as the question.