Learn R Programming

dtwclust (version 0.1.0)

plot-dtwclust: Plot the result of dtwclust

Description

Plots the time series of each cluster along with the obtained centroid. It uses ggplot2 plotting system.

Usage

## S3 method for class 'dtwclust,missing':
plot(x, y, clus = seq_len(x@k), data = NULL,
  ...)

Arguments

x
An object of class dtwclust-class as returned by dtwclust.
y
Ignored.
clus
Which clusters to plot.
data
The data in the same format as it was provided to dtwclust.
...
Further arguments to pass to geom_line for the plotting of the cluster centers. Default values are: linetype = "dashed", size = 1.5, colour = "black", alpha = 0.5.

Details

The flag save.data must be set to TRUE when running dtwclust to be able to use this.

Optionally, you can manually provide the clustering result as well as the data in data.

See Also

dtwclust-class, dtwclust