powered by
This function creates a time series plot using ggplot2.
plot_series(data, label_x = "", label_y = "", colors = NULL)
returns a ggplot graphic
data.frame contain x, value, and variable
x-axis label
y-axis label
color vector
x <- seq(0, 10, 0.25) data <- data.frame(x, sin=sin(x)) head(data) grf <- plot_series(data, colors=c("red")) plot(grf)
Run the code above in your browser using DataLab