View source: R/rendering_and_plotting.R
PlotIMFs | R Documentation |
This function displays IMFs generated using Sig2IMF
, EEMDCompile.
or EEMDResift
PlotIMFs(sig, time.span = NULL, imf.list = NULL, original.signal = TRUE,
residue = TRUE, fit.line = FALSE, lwd = 1, cex = 1, ...)
sig |
Data structure returned by |
time.span |
Time span over which to plot IMFs. |
imf.list |
Which IMFs to plot, |
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 |
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
.
It is very important to inspect the IMF set prior to rendering Hilbert spectrograms.
Oftentimes, problems with the EMD are obvious when the IMFs are plotted.
The fit.line
option can help with this.
Daniel Bowman danny.c.bowman@gmail.com
HHGramImage
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.