draw.wp | R Documentation |
This function draws a wavelet packet associated with a wp.object
.
## S3 method for class 'wp'
draw(wp, level, index, plot.it=TRUE, main, sub, xlab, ylab, ...)
wp |
The |
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). |
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). |
main |
The main argument for the plot |
sub |
The subtitle for the plot |
xlab |
The labels for the x axis |
ylab |
The labels for the y axis |
... |
Additional arguments to pass to the |
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.
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.
Version 3.9.6 Copyright Guy Nason 1998
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.
G P Nason
filter.select
, wp
, wp.object
, drawwp.default
.
#
# Generate some test data
#
test.data <- example.1()$y
## Not run: ts.plot(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?
#
## Not run: draw(tdwd, level=4, index=12)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.