View source: R/plot_time_series.R
plot_time_series | R Documentation |
Function to plot time series data.
plot_time_series(
df,
colour = "#FC4E07",
facet_variable = NA,
linewidth = 0.3,
scales = "free_y",
ylim = c(NA, NA),
nrow = NULL,
ncol = NULL
)
df |
Input data frame with at least two variables, two of which are named
|
colour |
Colour of line geometry or which variable in |
facet_variable |
Variable in |
linewidth |
Size/width of line geometry. |
scales |
Should scales be fixed ("free_y", the default), "fixed", free ("free"), or free in the x-dimension ("free_x", "free_y")? |
ylim |
Limits for y-axes. |
nrow , ncol |
When using |
ggplot2 plot.
Stuart K. Grange
# Build data frame with correct variables
df <- data.frame(
date = lubridate::ymd(c("2019-01-01", "2019-01-25"), tz = "UTC"),
value = 1:2
)
# Plot
plot_time_series(df)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.