| plot_series | R Documentation |
When x is "month", the axis shows month names.
plot_series(
data,
x,
y,
by = NULL,
facet = NULL,
smooth = NULL,
span = 2/3,
ribbon = NULL,
title = NULL,
ylabel = NULL
)
data |
Long data frame |
x |
Column for the horizontal axis (for example |
y |
Column for the vertical axis |
by |
Optional column. One line (and colour) per value. |
facet |
Optional column. One panel per value. |
smooth |
|
span |
Fraction of the points in each LOWESS window ( |
ribbon |
Optional |
title |
Plot title |
ylabel |
Vertical axis label. The default is |
ggplot object
df <- data.frame(year = 2001:2020, t2m = 25 + 0.03 * (1:20) + rnorm(20, sd = 0.2))
plot_series(df, "year", "t2m", smooth = "linear")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.