Learn R Programming

TSstudio (version 0.1.4)

ts_plot: Plotting Time Series Objects

Description

Visualization functions for time series object

Usage

ts_plot(ts.obj, line.mode = "lines", width = 2, dash = NULL,
  color = NULL, slider = FALSE, type = "multiple", Xtitle = NULL,
  Ytitle = NULL, title = NULL, Xgrid = FALSE, Ygrid = FALSE)

Arguments

ts.obj

A univariate or multivariate time series object of class "ts", "mts", "zoo", "xts", or any data frame object with a minimum of one numeric column and either a Date or POSIXt class column

line.mode

A plotly argument, define the plot type, c("lines", "lines+markers", "markers")

width

An Integer, define the plot width, default is set to 2

dash

A plotly argument, define the line style, c(NULL, "dot", "dash")

color

The color of the plot, support both name and expression

slider

Logic, add slider to modify the time axis (default set to FALSE)

type

Applicable for multiple time series object, plot on a separate plot or all together c("single, "multiple)

Xtitle

A character, set the X axis title, default set to NULL

Ytitle

A character, set the Y axis title, default set to NULL

title

A character, set the plot title, default set to NULL

Xgrid

Logic,show the X axis grid if set to TRUE

Ygrid

Logic,show the Y axis grid if set to TRUE

Examples

Run this code
# NOT RUN {
data(USVSales)
ts_plot(USVSales)

# adding slider
ts_plot(USVSales, slider = TRUE)
# }

Run the code above in your browser using DataLab