add_curve_fit | R Documentation |
Add curve fit
add_curve_fit(
plot,
dodge_width = NULL,
method = "loess",
linewidth = 0.25,
alpha = 0.4,
preserve = "total",
...
)
plot |
A |
dodge_width |
For adjusting the distance between grouped objects. Defaults
to |
method |
Smoothing method (function) to use, accepts either
For If you have fewer than 1,000 observations but want to use the same |
linewidth |
Thickness of the line in points (pt). Typical values range between |
alpha |
A |
preserve |
Should dodging preserve the |
... |
Arguments passed on to |
A tidyplot
object.
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_curve_fit()
# Changing arguments
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_curve_fit(linewidth = 1)
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_curve_fit(alpha = 0.8)
# Remove confidence interval
time_course |>
tidyplot(x = day, y = score, color = treatment) |>
add_curve_fit(se = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.