| plot_ts | R Documentation |
Simple time series plot with points and a line.
plot_ts(x = NULL, y, label_x = "", label_y = "", color = "black")
x |
time index (numeric vector) or NULL to use 1:length(y) |
y |
numeric series |
label_x |
x‑axis label |
label_y |
y‑axis label |
color |
color for the series |
If x is NULL, an integer index 1:n is used. The color applies to both points and line.
returns a ggplot2::ggplot graphic
x <- seq(0, 10, 0.25)
y <- sin(x)
grf <- plot_ts(x = x, y = y, color=c("red"))
plot(grf)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.