I'm trying to fit a curve to my data points in R, but geom_smooth is just drawing an ugly line through all the points. I'm looking for a way to make a smooth curve that doesn't necessarily go through all the points.
and here is the code I used to make it:
data <- data.frame(thickness = c(0.25, 0.50, 0.75, 1.00),
capacitance = c(1.844, 0.892, 0.586, 0.422))
ggplot(data, aes(x = thickness, y = capacitance)) +
geom_point() +
geom_smooth(method = "loess", se = F, formula = (y ~ (1/x)))