plot.fts: Functional Time Series Visualization Tools Using Plotly

Description Usage Arguments Note Examples

View source: R/ftsplot.r

Description

This is a plotting method for univariate or multivariate functional time series (fts). This method is designed to help the user visualize fts data using a variety of techniques that use plotly.

Usage

1
2
3
## S3 method for class 'fts'
plot(x, npts = 100, type = "line", main = NULL,
  ylab = NULL, xlab = NULL, tlab = NULL, var = NULL, ...)

Arguments

x

an object of class fts

npts

number of points to evaluate functional object at

type

the type of plot to be displayed where possible types are:

  • "line" plot the fts elements in a line plot (default)

  • "heatmap" plot the fts elements in a heat map

  • "3Dsurface" plot the fts elements as a surface

  • "3Dline" plot the fts elements in a three-dimensional line plot

main

the main title

ylab

the y-axis label

xlab

the x-axis label

tlab

the time-axis label

var

an integer specifying the variable number to plot if type="3Dsurface" or type="3Dline"

...

arguments to be passed to methods, such as graphical parameters.

Note

for a multivariate example, see the examples in fssa

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## Not run: 
require(fda)
require(Rfssa)
data(Callcenter) # Read data
u=seq(0,1,length.out=240) # Define domain of functional data
d=12 # number of basis elements
basis=create.bspline.basis(rangeval = c(0,1),nbasis = d) # create basis object
smooth.calls=smooth.basis(u, matrix(nrow=240,ncol=365,Callcenter$calls), basis)
Y=fts(smooth.calls$fd) # create functional time series
plot(Y,type = "heatmap")
plot(Y,type = "line",var = 1)
plot(Y,type = "3Dsurface",var = 1)
plot(Y,type = "3Dline",var = 1)

## End(Not run)

Rfssa documentation built on Sept. 13, 2019, 1:05 a.m.