plot.mimf: Plot IMFs

Description Usage Arguments Details Examples

View source: R/mimf_description.R

Description

Method to display the (M)IMFs obtained by the function memd.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## S3 method for class 'mimf'
plot(
  x,
  tt = NULL,
  select.var = NULL,
  select.imf = NULL,
  input = TRUE,
  input.lab = "X",
  imf.lab = NULL,
  grid = c("zeroline", "complete", "none"),
  grid.col = "lightgray",
  space = 1,
  add.legend = p > 1,
  legend.pars = list(),
  ...
)

Arguments

x

mimf x or array to plot.

tt

Vector containing custom time indices for the IMFs. If NULL, looks for the tt attribute of x.

select.var

Character or numeric vector giving a subset of variables for which to plot the IMFs.

select.imf

Character or numeric vector giving a subset of IMFs to plot.

input

Logical. If TRUE, the top panel shows the original signal. Only considered if x is a mimf object.

input.lab

The label of the panel showing the input signal.

imf.lab

Character vector giving labels for the IMFs. NULL displays the dimnames of x and NA removes the labels.

grid

Character giving the type of grid to plot. "zeroline" (the default) only draws the zeroline, "complete" draws a complete grid and "none" draws no grid at all.

grid.col

The grid color.

space

Numeric value giving the margin between two panels in the plot.

add.legend

Logical value. If TRUE (the default) a legend is automatically drawn at the top of the plot.

legend.pars

List of optional parameters for the legend. Can be useful to indicate custom names for the variables for instance. See legend.

...

Other graphical parameters. See par.

Details

One panel is drawn for each IMF. In the multivariate case, by default all IMF's variables are scaled and displayed on the same panel. To obtain the true amplitude of each variable, they must be plotted separately.

If noise channel are present in the signal, i.e. if the argument keep.noise = TRUE in memd, they are not displayed by default. To display them, the argument select.var must be set manually. Note that, in this case, it automatically set the argument input to FALSE.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
   library(dlnm)
   
   # Decompose both temperature and relative humidity with NA-MEMD
   # Adding two noise variables 
   X <- chicagoNMMAPS[,c("temp", "rhum")]
   mimfs <- memd(X, l = 2) # Takes a couple of minutes

   # Plot the two variables on the same graph
   plot(mimfs)

   # Plot the two variables separately
   plot(mimfs, select.var = "temp", col = "red")
   plot(mimfs, select.var = "rhum", col = "blue")

PierreMasselot/Library--emdr documentation built on June 19, 2021, 8:58 a.m.