powered by
This function plots a time series chart with points and a line using ggplot2.
plot_ts(x = NULL, y, label_x = "", label_y = "", color = "black")
returns a ggplot graphic
input variable
output variable
x-axis label
y-axis label
color for time series
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)
Run the code above in your browser using DataLab