plot ERP waveforms in a scalp array

Share:

Description

This function plots the waveforms of several electrodes in an rectangular array reflecting their positions on the scalp

Usage

1
2
3
4
5
scalp(categ, smo = NULL, layout = 1, 
ylims = "auto", yrev = TRUE, startmsec = -200, endmsec = 1200, 
lwd = 1, lty = 1, color.list = c("blue", "red", "darkgreen"), 
legend = F, legend.lab = "default", t.axis = seq(-100, endmsec, 200), 
scalp.array=NULL)

Arguments

categ

a list indicating the ERP data frame to be plotted. All electrodes specified in the parameter layout will be plotted. The other electrodes will be ignored.

smo

the smoothing parameter to apply (see smooth.spline). Default is NULL and no smoothing is applied.

layout

A number indicating the layout of electrodes to be plotted. Currently only few default layouts are supported (a number from 1 to 5). Alternatively, a character vector specifying the layout may be supplied (see Details).

ylims

a number indicating the upper and lower limits of the y-axis. If "auto", the function calculates the y limits automatically.

yrev

logical. If TRUE, the y-axis is plotted with the negative values upward.

startmsec

the start time (in ms) of the ERP vector

endmsec

the end time (in ms) of the ERP vector

lwd

a vector specifying the line width to be associated with each ERP data frame specified in categ

lty

a vector specifying the line types to be associated with each ERP data frame specified in categ

color.list

a vector specifying the colors to be associated with each ERP data frame specified in categ

legend

logical. If TRUE a legend with object names is drawn in the top-right corner of the array.

legend.lab

the legend labels. If "default", the names are retrieved from categ.

t.axis

the position of the ticks on an additional axis indicating the time. This axis is plotted in the bottom-left corner of the plot array.

scalp.array

This argument is vector of two values indicating the number of panels of the plot, as number of rows and number of columns respectively. If a default layout is specified, the number of panels is automatically computed. See also Details.

Details

The layout parameter can be a number (from 1 to 5), that specifies some default electrode arrangements (currently only a few default arrangements are supported). Otherwise, the argument may be a character vector indicating the names of the electrodes to be plotted. The plot is divided in a number of panels as specified in scalp.array. The names specified will be plotted from top to bottom and from left to right. If "blank" is specified an empty panel will be plotted. If "xaxis" is specified a x axis indicating time will be plotted. If "yaxis" is specified a y axis indicating voltage will be plotted.

Value

The function plots a map of ERP waveforms in an array resembling the topographic locations of the electrodes on the scalp.

Warning

In categ argument, a list must be specified even if only one object is plotted.

Warning

in the categ argument, a list must be specified even if the plot is on only one object

Note

Currently this function supports a very limited number of layouts. Further versions will allow to specify customized layouts.

Author(s)

Giorgio Arcara

See Also

scalp.t, scalp.infl, erp

Examples

1
2
3
4
5
6
7
8
9
data(ERPsets)

word=grandaverage("Exp1_word_subj", 1:20, erplist=ERPsets)

nonword=grandaverage("Exp1_nonword_subj", 1:20, erplist=ERPsets)

scalp(list(word), layout=1, ylim=10)

scalp(list(word, nonword), layout=1, ylim=10, legend=TRUE)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.