Raw File
Tip revision: d51529a8ee2827cd8c1bd7c4a9e0265dd0cc72cf authored by Toni Giorgino on 19 September 2022, 16:36:11 UTC
version 1.23-1
Tip revision: d51529a
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.dtw.R
\title{Display the cumulative cost density with the warping path overimposed}
  normalize = FALSE,
  xlab = "Query index",
  ylab = "Reference index",
\item{d}{an alignment result, object of class \code{dtw}}

\item{normalize}{show per-step average cost instead of cumulative cost}

\item{xlab}{label for the query axis}

\item{ylab}{label for the reference axis}

\item{...}{additional parameters forwarded to plotting functions}
The plot is based on the cumulative cost matrix. It displays the optimal alignment
as a "ridge" in the global cost landscape.
The alignment must have been
constructed with the \code{keep.internals=TRUE} parameter set.

If \code{normalize} is \code{TRUE}, the \emph{average} cost per step is
plotted instead of the cumulative one. Step averaging depends on the
\code{\link[=stepPattern]{stepPattern()}} used.

## A study of the "Itakura" parallelogram
## A widely held misconception is that the "Itakura parallelogram" (as
## described in the original article) is a global constraint.  Instead,
## it arises from local slope restrictions. Anyway, an "itakuraWindow",
## is provided in this package. A comparison between the two follows.

## The local constraint: three sides of the parallelogram are seen

ita <- dtw(query,reference,keep=TRUE,step=typeIIIc)
dtwPlotDensity(ita, main="Slope-limited asymmetric step (Itakura)")

## Symmetric step with global parallelogram-shaped constraint. Note how
## long (>2 steps) horizontal stretches are allowed within the window.

        main="Symmetric step with Itakura parallelogram window")

Other plot: 
back to top