Plotting paths

Share:

Description

Method for plotting low cost paths in the TWDTW cost matrix.

Usage

1
plotPaths(x, timeseries.labels = NULL, patterns.labels = NULL, k = NULL)

Arguments

x

An object of class twdtwMatches.

timeseries.labels

the label or index of the time series. Default is 1.

patterns.labels

a vector with labels of the patterns. If not declared the function will plot one alignment for each pattern.

k

A positive integer. The index of the last alignment to include in the plot. If not declared the function will plot all low cost paths.

Value

A ggplot object.

Author(s)

Victor Maus, vwmaus1@gmail.com

See Also

twdtwMatches-class, twdtwApply, plotAlignments, plotCostMatrix, plotMatches, and plotClassification.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
log_fun = logisticWeight(-0.1, 100)
ts = twdtwTimeSeries(example_ts.list)
patt = twdtwTimeSeries(patterns.list)
mat1 = twdtwApply(x=ts, y=patt, weight.fun=log_fun, keep=TRUE)

plotPaths(mat1)

plotPaths(mat1, patterns.labels="Soybean", k=1:2)

plotPaths(mat1, patterns.labels=c("Maize","Cotton"), k=2)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.