HHSpecPlot: Display Hilbert periodogram

Description Usage Arguments Details Author(s) See Also Examples

View source: R/rendering_and_plotting.R

Description

This function displays the Hilbert periodogram, with options to plot individual IMFs and also the Fourier periodogram for comparison.

Usage

1
2
3
HHSpecPlot(hspec, freq.span = NULL, scaling = "none", imf.list = NULL, 
    show.total = TRUE, show.fourier = FALSE, scale.fourier = FALSE, 
    show.imfs = FALSE, legend = TRUE, ...)

Arguments

hspec

Data structure returned by HHSpectrum

freq.span

Frequency range to plot, NULL plots all of them

scaling

Amplitude scaling, can be "log" (log 10), "sqrt" (square root), defaults to "none".

imf.list

Which IMFs to plot, requires show.imfs = TRUE.

show.total

Show the ensemble Hilbert spectrogram

show.fourier

Show the Fourier periodogram

scale.fourier

Scale Fourier and Hilbert spectra to each other for easier comparison

show.imfs

Plot individual IMF spectra

legend

Determines whether or not a legend is shown

...

This function supports some optional parameters as well:

  • xlab - X axis label

  • ylab - Y axis label

  • legend.location - where to put the legend

  • total.col - color of ensemble Hilbert periodogram

  • total.lwd - lwd of ensemble Hilbert periodogram

  • total.lty - lty of ensemble Hilbert periodogram

  • imf.cols - colors of IMF periodogram

  • imf.lwd - lwds of IMF periodogram

  • imf.lty - ltys of IMF periodogram

  • fourier.col - color of Fourier periodogram

  • fourier.lwd - lwd of Fourier periodogram

  • fourier.lty - lty of Fourier periodogram

  • main - figure title

Details

This function plots the Hilbert periodogram of a signal, with options to show periodograms of individual IMFs. You can also plot a simple Fourier periodogram for comparison.

Author(s)

Daniel Bowman [email protected]

See Also

HHSpectrum, HHGramImage

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#Here we see how the EMD produces a dyadic filter bank for uniform random noise
#The frequency distributions of all but the first IMF display a Chi-Square distribution
#See Huang, N. E. & Wu, Z. 
#A review on Hilbert-Huang Transform: Method and its applications to geophysical studies.
#Reviews of Geophysics, 2008, 46, RG2006

#The EMD of this signal may take a couple of minutes to run

set.seed(628)
sig  <-  runif(10000)
tt  <-  seq_len(length(sig)) * 0.01

## Not run: emd.result  <-  Sig2IMF(sig, tt)

dfreq  <-  0.1
## Not run: hspec  <-  HHSpectrum(emd.result, dfreq)

## Not run: HHSpecPlot(hspec, show.imfs = TRUE, 
imf.list = 1:10, show.total = TRUE, scaling = "sqrt", 
imf.lwd = rep(2, 10), total.lty = 3)
## End(Not run)

hht documentation built on May 29, 2017, 9:26 a.m.