In the R default plotting, users can change the f index to vary the smoothing level of loess regression (high f means high smooth).
I did the loess regression with ggplot2 stat_smooth
with the following command:
ggplot(data=combine, aes(x=pos/1000000, y=weightedFst, color=group, group=group)) +
geom_smooth(method="loess", size=1, formula = y ~ x) +
scale_x_continuous(limits=c(0, 302), breaks=c(50, 250)) +
xlab("physical position (Mb)") + ylab("Fst") +
ggtitle("loess regression of Fst in 10kb non-overlapping windows") +
theme_bw()`
How can I change the smoothing level of loess regression in ggplot2? I searched around but could not find the answers. Could anyone help here?