ggplot(DT, aes(xx, yy)) +
geom_point() +
scale_x_continuous(breaks = seq(2013, 2023, by = 1)) +
geom_xspline(color = "#0003f3", linewidth = 20)
I have used the breaks in scale_x_continuous in order to get proper x asix.
there are two problems
- geom_xspline does not accept linewidth and if i change to size argument, it is not working
- how to shade the area under the line
I am wondering if there a way to function i could pass xx and and yy and it will calculate the spline.