WaveThresh Help

draw.wp


Draw wavelet packet associated with a wp object.

DESCRIPTION

This function draws a wavelet packet associated with a wp object.

USAGE

draw.wp(wp, level, index, plot.it=T, ...)

REQUIRED ARGUMENTS

wp
The wp class object whose associated wavelet packet you wish to draw.
level
The resolution level of wavelet packet in the wavelet packet decomposition that you wish to draw (corresponds to scale).
index
The packet index of the wavelet packet in the wavelet packet decomposition that you wish to draw (corresponds to number of oscillations).

OPTIONAL ARGUMENTS

plot.it
If TRUE then the wavelet packet is plotted on the active graphics device. If FALSE then the y-coordinates of the packet are returned. Note that x-coordinates are not returned (the packet is periodic on its range anyway).
...
Additional arguments to pass to the drawwp.default function which does the drawing. In particular, arguments can be set to choose between drawing the mother wavelet and scaling function, to set the resolution of the plot, to choose between drawing one and two dimensional pictures.

VALUE

If the plot.it argument is set to TRUE then nothing is returned. Otherwise, if plot.it is set to FALSE the coordinates of what would have been plotted are returned.

SIDE EFFECTS

If the plot.it argument is TRUE (which it is by default) a plot of the appropriate wavelet packet is plotted on the active graphics device.

DETAILS

This function extracts the filter component from the wp object (which is constructed using the filter.select function) to decide which wavelet packet family to draw. Once decided the drawwp.default function is used to actually do the drawing.

RELEASE

Version 3.9.6 Copyright Guy Nason 1998

SEE ALSO

filter.select, wp, wp object, drawwp.default.

EXAMPLES

#
# Generate some test data
#
test.data <- example.1()$y
tsplot(test.data)

#
# Now do the wavelet packet transform of the data using the Daubechies
# least-asymmetric wavelet N=10 (the default arguments in
# wp).
#
tdwp <- wp(test.data)
#
# What happens if we try to draw this new tdwp object?
#
draw(tdwd, level=4, index=12)