Learn R Programming

wavelets (version 0.2-6)

plot.modwt: Plot MODWT Coefficients

Description

Plot MODWT wavelet and scaling coefficients.

Usage

## S3 method for class 'modwt':
plot(x, levels = NULL, draw.boundary = FALSE, type = "stack",
col.plot = "black", col.boundary = "red", X.xtick.at = NULL, X.ytick.at
= NULL, Stack.xtick.at = NULL, Stack.ytick.at = NULL, X.xlab = "t",
y.rlabs = TRUE, plot.X = TRUE, plot.W = TRUE, plot.V = TRUE, ...)

Arguments

Details

plot.modwt plots the MODWT wavelet and scaling coefficients. The type parameter species the type of plot, which is currently only stack. If the MODWT object is defined for multiple time series, only the data pertaining to the first time series of the MODWT object is plotted. Thus, only the wavelet coefficients and scaling coefficients of the first time series of the MODWT object will be plotted. If a single number is specified for levels, then the wavelet coefficients of levels 1 through levels will be plotted. Otherwise, a vector or the first element of a list will specify which levels of the wavelet coefficients will be plotted. Unless specified in the second element of a list, only one level of scaling coefficients will be plotted and this level is equal to the highest level of the wavelet coefficients plotted. For each respective axis, the distance between a tick mark on the plot of the original time series is equivalent to the distance between a tick mark on the stacked plot. Thus, when altering the relative spacing of the tick marks on the plot of the original time series using X.xtick.at or X.ytick.at, the tick marks of the stacked plot are automatically adjusted. If the plot of the original time series is not drawn, then the user can alter the spacing of the tick marks using Stack.xtick.at and Stack.ytick.at for the horizontal and vertical axes, respectively. One of plot.W or plot.V must be TRUE.

References

Percival, D. B. and A. T. Walden (2000) Wavelet Methods for Time Series Analysis, Cambridge University Press.

See Also

stackplot

Examples

Run this code
X <- rnorm(2048)
modwtobj <- modwt(X)

# Plotting wavelet coefficients at levels 1 through 6 and scaling
# coefficients at level 6.
plot.modwt(modwtobj, levels = 6)

# Plotting wavelet coefficients of levels 1, 3, 5, and scaling
# coefficients of levels 4 and 5, and green boundary coefficients
# lines.
plot.modwt(modwtobj, levels = list(c(1,3,5),c(4,5)), draw.boundary =
TRUE, col.boundary = "green")

# Plotting wavelet coefficients at level 1 through 6 and not plotting
# any scaling coefficients.
plot.modwt(modwtobj, levels = 6, plot.V = FALSE)

Run the code above in your browser using DataLab