plotdenwd: Plot the wavelet coefficients of a p.d.f.

plotdenwdR Documentation

Plot the wavelet coefficients of a p.d.f.

Description

Plots the wavelet coefficients of a density function.

Usage

plotdenwd(wd, xlabvals, xlabchars, ylabchars, first.level=0,
	top.level=nlevelsWT(wd)-1,
	main="Wavelet Decomposition Coefficients", scaling="global",
	rhlab=FALSE, sub, NotPlotVal=0.005, xlab="Translate",
	ylab="Resolution Level", aspect="Identity", ...)

Arguments

wd

Wavelet decomposition object, usually output from denwd, possibly thresholded.

xlabvals

X-axis values at which the xlabchars will be printed

xlabchars

The x-label characters to be plotted at xlabvals

ylabchars

The y-label characters

first.level

This specifies how many of the coarse levels of coefficients are omitted from the plot. The default value of 0 means that all levels are plotted.

top.level

This tells the plotting rountine the true resolution level of the finest level of coefficients. The default results in the coarsest level being labelled 0. The "correct" value can be determined from the empirical scaling function coefficient object (output from denproj) as in the example below.

main

The title of the plot.

scaling

The type of scaling applied to levels within the plot. This can be "compensated", "by.level" or "global". See plot.wd for further details.

rhlab

Determines whether the scale factors applied to each level before plotting are printed as the right hand axis.

sub

The plot subtitle

NotPlotVal

If the maximum coefficient in a particular level is smaller than NotPlotVal, then the level is not plotted.

xlab

The x-axis label

ylab

The y-axis label

aspect

Function to apply to coefficients before plotting

...

Other arguments to the main plot routine

Details

Basically the same as plot.wd except that it copes with the zero boundary conditions used in density estimation. Note that for large filter number wavelets the high level coefficients will appear very squashed compared with the low level coefficients. This is a consequence of the zero boundary conditions and the use of the convention that each coefficient is plotted midway between two coefficients at the next highest level, as in plot.wd.

Value

Axis labels to the right of the picture (scale factors). These are returned as they are sometimes hard to read on the plot.

Author(s)

David Herrick

Examples

# Simulate data from the claw density, find the empirical
# scaling function coefficients, decompose them and plot
# the resulting wavelet coefficients

data <- rclaw(100)
datahr <- denproj(data, J=8, filter.number=2, family="DaubExPhase")
data.wd <- denwd(datahr)
## Not run: plotdenwd(data.wd, top.level=(datahr$res$J-1))
#
# Now use a smoother wavelet
#
datahr <- denproj(data, J=8, filter.number=10, family="DaubLeAsymm")
data.wd <- denwd(datahr)
## Not run: plotdenwd(data.wd, top.level=(datahr$res$J-1))

wavethresh documentation built on Sept. 11, 2024, 9:33 p.m.