Skip to contents

Plotting methods for vector-valued functional data (tf_mv, functions \(R \to R^d\)), mirroring the display modes of tf::plot.tf_mv().

Usage

# S3 method for class 'tf_mv'
autoplot(object, ..., type = NULL)

# S3 method for class 'tf_mv'
autolayer(object, ..., type = NULL)

Arguments

object

a tf_mv object

...

passed to geom_path() (trajectory) or geom_line() (facet)

type

"trajectory", "facet", or NULL to resolve from the number of components (see Details).

Value

A tf_ggplot() object for autoplot(), a ggplot2::layer() for autolayer().

Details

For two-component objects (d == 2) the default is a "trajectory" plot of the planar curve x(t) vs y(t) (drawn with geom_path(), which connects in argument order). Otherwise the default is "facet": value-vs-arg curves with one panel per output dimension. autolayer() returns a single layer (no faceting) and works with plain ggplot2::ggplot() as well as tf_ggplot().

See also

Other tidyfun visualization: autoplot.tf(), ggcapellini, gglasagna(), ggspaghetti

Examples

library(ggplot2)
mv <- tfd_mv(list(x = tf_rgp(5), y = tf_rgp(5)))
autoplot(mv)

ggplot() + autolayer(mv)