plot_ts: Plot time series chart

View source: R/graphics.R

plot_tsR Documentation

Plot time series chart

Description

This function plots a time series chart with points and a line using ggplot2.

Usage

plot_ts(x = NULL, y, label_x = "", label_y = "", color = "black")

Arguments

x

input variable

y

output variable

label_x

x-axis label

label_y

y-axis label

color

color for time series

Value

returns a ggplot graphic

Examples

x <- seq(0, 10, 0.25)
data <- data.frame(x, sin=sin(x))
head(data)

grf <- plot_ts(x = data$x, y = data$sin, color=c("red"))
plot(grf)

daltoolbox documentation built on Nov. 3, 2024, 9:06 a.m.