Plotting of dynamic time warp results: annotated warping function Display the query and reference time series and their warping curve, arranged for visual inspection. **Details** The query time series is plotted in the bottom panel, with indices growing rightwards and values upwards. Reference is
(d, xts=None, yts=None,
match_indices=None,
match_col="gray",
xlab="Query index",
ylab="Reference index", **kwargs)
| 204 | |
| 205 | |
| 206 | def dtwPlotThreeWay(d, xts=None, yts=None, |
| 207 | match_indices=None, |
| 208 | match_col="gray", |
| 209 | xlab="Query index", |
| 210 | ylab="Reference index", **kwargs): |
| 211 | # IMPORT_RDOCSTRING dtwPlotThreeWay |
| 212 | """Plotting of dynamic time warp results: annotated warping function |
| 213 | |
| 214 | Display the query and reference time series and their warping curve, |
| 215 | arranged for visual inspection. |
| 216 | |
| 217 | **Details** |
| 218 | |
| 219 | The query time series is plotted in the bottom panel, with indices |
| 220 | growing rightwards and values upwards. Reference is in the left panel, |
| 221 | indices growing upwards and values leftwards. The warping curve panel |
| 222 | matches indices, and therefore element (1,1) will be at the lower left, |
| 223 | (N,M) at the upper right. |
| 224 | |
| 225 | Argument ``match_indices`` is used to draw a visual guide to matches; if |
| 226 | a vector is given, guides are drawn for the corresponding indices in the |
| 227 | warping curve (match lines). If integer, it is used as the number of |
| 228 | guides to be plotted. The corresponding style is customized via the |
| 229 | ``match_col`` and ``match_lty`` arguments. |
| 230 | |
| 231 | If ``xts`` and ``yts`` are not supplied, they will be recovered from |
| 232 | ``d``, as long as it was created with the two-argument call of [dtw()] |
| 233 | with ``keep_internals=True``. Only single-variate time series can be |
| 234 | plotted. |
| 235 | |
| 236 | Parameters |
| 237 | ---------- |
| 238 | d : |
| 239 | an alignment result, object of class `dtw` |
| 240 | xts : |
| 241 | query vector |
| 242 | yts : |
| 243 | reference vector |
| 244 | xlab : |
| 245 | label for the query axis |
| 246 | ylab : |
| 247 | label for the reference axis |
| 248 | main : |
| 249 | main title |
| 250 | type_align : |
| 251 | line style for warping curve plot |
| 252 | type_ts : |
| 253 | line style for timeseries plot |
| 254 | match_indices : |
| 255 | indices for which to draw a visual guide |
| 256 | margin : |
| 257 | outer figure margin |
| 258 | inner_margin : |
| 259 | inner figure margin |
| 260 | title_margin : |
| 261 | space on the top of figure |
| 262 | ... : |
| 263 | additional arguments, used for the warping curve |