plotly_funts: Plot Functional Time Series (funts) with Plotly

View source: R/plotly_funts.R

plotly_funtsR Documentation

Plot Functional Time Series (funts) with Plotly

Description

Visualize univariate or multivariate Functional Time Series (funts) using Plotly-based plots.

Usage

plotly_funts(
  x,
  vars = NULL,
  types = NULL,
  subplot = TRUE,
  main = NULL,
  ylab = NULL,
  xlab = NULL,
  tlab = NULL,
  zlab = NULL,
  xticklabels = NULL,
  xticklocs = NULL,
  yticklabels = NULL,
  yticklocs = NULL,
  color_palette = "RdYlBu",
  reverse_color_palette = FALSE,
  ...
)

Arguments

x

an object of class funts.

vars

numeric vector specifying which variables in the FTS to plot (default: all).

types

tuple of strings specifying plot types for each variable.

subplot

logical for subplotting line plots.

main

titles for each plot.

ylab

y-axis titles.

xlab

x-axis titles.

tlab

time-axis titles.

zlab

z-axis titles.

xticklabels

tick labels for the domain of the functions.

xticklocs

positions of tick labels for the domain of the functions.

yticklabels

tick labels for the domain of the functions.

yticklocs

positions of tick labels for the domain of the functions.

color_palette

color palette for two-dimensional FTS plots.

reverse_color_palette

reverse the color palette scale.

...

additional arguments to pass to Plotly methods.

Details

Supported plot types for one-dimensional domain variables: - "line": line plots (default). - "heatmap": heatmaps. - "3Dsurface": 3D surface plots. - "3Dline": 3D line plots.

Supported plot type for two-dimensional domain variables: - "heatmap"

Each variable can be plotted multiple times with different types.

See Also

funts, Callcenter, Montana

Examples

## Not run: 
data("Callcenter") # Univariate FTS example

plotly_funts(Callcenter)

plotly_funts(Callcenter,
  main = "Call Center Data Line Plot",
  xticklabels = list(c("00:00", "06:00", "12:00", "18:00", "24:00")),
  xticklocs = list(c(1, 60, 120, 180, 240))
)

plotly_funts(Callcenter, type = "3Dline", main = "Callcenter Data")

plotly_funts(Callcenter, type = "3Dsurface", main = "Callcenter Data")

plotly_funts(Callcenter, type = "heatmap", main = "Callcenter Data")


data("Montana") # Multivariate FTS example
plotly_funts(Montana[1:100],
  main = c("Temperature Curves", "NDVI Images"),
  color_palette = "RdYlGn",
  xticklabels = list(
    c("00:00", "06:00", "12:00", "18:00", "24:00"),
    c("113.40\u00B0 W", "113.30\u00B0 W")
  ),
  xticklocs = list(c(1, 6, 12, 18, 24), c(1, 33)),
  yticklabels = list(NA, c("48.70\u00B0 N", "48.77\u00B0 N")),
  yticklocs = list(NA, c(1, 33))
)

## End(Not run)

Rfssa documentation built on May 29, 2024, 8:58 a.m.