plot.wst | R Documentation |
This function plots packet-ordered non-decimated wavelet transform
coefficients arising from a wst.object
object.
## S3 method for class 'wst'
plot(x, main = "Nondecimated Wavelet (Packet) Decomposition",
sub, first.level = 5, scaling = "compensated", dotted.turn.on = 5,
aspect = "Identity", ...)
x |
The wst object whose coefficients you wish to plot. |
main |
The main title of the plot. |
sub |
A subtitle for the plot. |
first.level |
The first resolution level to begin plotting at. This argument can be quite useful when you want to suppress some of the coarser levels in the diagram. |
scaling |
How you want the coefficients to be scaled.
The options are: I don't know why compensated is the default option? It is a bit silly. |
dotted.turn.on |
The plot usually includes some dotted vertical bars that separate wavelet packets to make it clearer which packets are which. This option controls the coarsest resolution level at which dotted lines appear. All levels equal to and finer than this level will receive the vertical dotted lines. |
aspect |
A transform to apply to the coefficients before plotting. If the coefficients are complex-valued and aspect="Identity" then the modulus of the coefficients are plotted. |
... |
Other arguments to plot |
A packet-ordered non-decimated wavelet object contains coefficients
of a signal (usually obtained by the wst
packet-ordered non-decimated wavelet transform, but also
functions that derive such objects, such as threshold.wst
).
A packet-ordered nondecimated wavelet object, x,
possesses nlevelsWT(x)
resolution levels.
In WaveThresh the coarsest level is level 0 and the finest is level
nlevelsWT-1
. For packet-ordered nondecimated wavelet
the number of blocks (packets) at
level j
is 2^(nlevelsWT-j)
.
This function plots the coefficients.
At the bottom of the plot the original input function (if present) is plotted.
Then levels above the original plot successively coarser wavelet
coefficients.
Each packet of coefficients is plotted within dotted vertical lines.
At the finest level there are two packets: one (the left one) correspond to
the wavelet coefficients that would be obtained using the (standard)
decimated wavelet transform function, wd
,
and the other packet are those coefficients that would have been obtained
using the standard decimated wavelet transform after a unit cyclic shift.
For coarser levels there are more packets corresponding to different cyclic shifts (although the computation is not performed using shifting operations the effect is the same). For full details see Nason and Silverman, 1995.
Packets are drawn on the plot and can be separated by vertical dotted lines.
The resolution levels at which this happens can be controlled by the
dotted.turn.on
option.
The coarsest resolution level to be drawn is controlled by
the first.level option
.
It should be noted that the packets referred to here are just the
blocks of nondecimated wavelet coefficients in a packet-ordering.
These are different to wavelet packets (produced by wp
)
and nondecimated wavelet packets (produced by wpst
)
Nothing
G P Nason
MaNoVe
,threshold.wst
, wst
, wst.object
#
# Generate some test data
#
v <- DJ.EX()$heavi
#
# Let's plot these to see what they look like
#
## Not run: plot(v, type="l")
#
# Do a packet-ordered non-decimated wavelet packet transform
#
vwst <- wst(v)
#
# Now plot the coefficients
#
## Not run: plot(vwst)
#
# Note that the "original" function is at the bottom of the plot.
# The finest scale coefficients (two packets) are immediately above.
# Increasingly coarser scale coefficients are above that!
#
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.