hht (version 2.1.3)

PlotIMFs: Display IMFs

Description

This function displays IMFs generated using Sig2IMF, EEMDCompile. or EEMDResift

Usage

PlotIMFs(sig, time.span = NULL, imf.list = NULL, original.signal = TRUE, residue = TRUE, fit.line = FALSE, lwd = 1, cex = 1, ...)

Arguments

sig
Data structure returned by Sig2IMF, EEMDCompile, or EEMDResift.
time.span
Time span over which to plot IMFs. NULL will draw the entire signal.
imf.list
Which IMFs to plot, NULL plots all of them.
original.signal
whether or not to plot the original signal.
residue
whether to plot the residue of the EMD method.
fit.line
whether to add a red line to the original signal trace showing how much of the original signal is contained in the selected IMFs and/or residual.
lwd
Line weight.
cex
Text size.
...
Pass additional graphics parameters to IMF plotter

Details

This function plots the IMF decomposition of a signal. It can show the original signal and also the residue left over when the IMFs are removed from the signal. The plotter can use data from both EMD and EEMD runs. When it plots EEMD data, it shows the averaged IMFs from the trials processed by EEMDCompile.

See Also

HHGramImage

Examples

Run this code
data(PortFosterEvent)

#Run EMD
emd.result <- Sig2IMF(sig, tt, sm = "polynomial")

#Plot the first 4 IMFs of the EEMD of a signal.
time.span <- c(5, 10)
imf.list <- 1:4
original.signal <- TRUE
residue <- TRUE

PlotIMFs(emd.result, time.span, imf.list, original.signal, residue)

#Check how much contribution IMFs 2 and 3 make to the complete signal
imf.list <- c(2, 3)
fit.line <- TRUE
PlotIMFs(emd.result, time.span, imf.list, original.signal, residue, fit.line)

Run the code above in your browser using DataCamp Workspace