Description Usage Arguments Value Note Author(s) References Examples
Creates two- or three-dimensional plot of dense electroencephalography (EEG) cap that spans user-input electrodes. Three-dimensional plots are created using the eegdense
data and the plot3d
function (from rgl
package). Currently supports 933 scalp electrodes. Includes customization options (e.g., each electrode can have a unique plotting color, size, label color, etc.).
1 2 3 4 5 6 | eegcapdense(electrodes = "10-10", type = c("2d", "3d"),
plotlabels = TRUE, plotaxes = FALSE, main = "",
xyzlab = NULL, cex.point = NULL, col.point = NULL,
cex.label = NULL, col.label = NULL, nose = TRUE,
ears = TRUE, head = TRUE, col.head = "AntiqueWhite",
index = FALSE, zconst = 0.5, plt = c(0.03,0.97,0.03,0.97), ...)
|
electrodes |
Character vector with electrodes to plot. Each element of |
type |
Type of plot to create: |
plotlabels |
If |
plotaxes |
If |
main |
Title to use for plot. Default is no title |
xyzlab |
Axis labels to use for plot. If |
cex.point |
Size of electrode points. Can have a unique size for each electrode. |
col.point |
Color of electrode points. Can have a unique color for each electrode. |
cex.label |
Size of electrode labels. Can have a unique size for each electrode label. Input is ignored if |
col.label |
Color of electrode labels. Can have a unique color for each electrode label. Input is ignored if |
nose |
If |
ears |
If |
head |
If |
col.head |
Color for dummy head in 3d plot. Ignored if |
index |
Logical indicating if the cap row indices should be returned (see Note). |
zconst |
Scalar controlling which row indices should be returned (see Note). |
plt |
A vector of the form c(x1, x2, y1, y2) giving the coordinates of the plot region as fractions of the current figure region. See |
... |
Optional inputs for |
Produces plot of EEG cap and possibly returns cap row indices.
Currently supports 84 scalp electrodes (plus ears and nose): A1 A2 AF1 AF2 AF3 AF4 AF5 AF6 AF7 AF8 AFZ C1 C2 C3 C4 C5 C6 CP1 CP2 CP3 CP4 CP5 CP6 CPZ CZ F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 FC1 FC2 FC3 FC4 FC5 FC6 FCZ FP1 FP2 FPZ FT7 FT8 FT9 FT10 FZ I1 I2 IZ NZ O1 O2 OZ P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 POZ PZ T7 T8 T9 T10 TP7 TP8 TP9 TP10
See eegdense
for the coordinates used to create plot. Setting index=TRUE
returns the row indices of eegdense
that were used to plot the cap. Only returns row indices with z-coordinates >= (zmin-zconst), where zmin is minimum z-coordinate of input electrodes.
To save three-dimensional plots, use the rgl.postscript
function (from rgl
package).
Nathaniel E. Helwig <helwig@umn.edu>
Adler, D., Murdoch, D., and others (2014). rgl: 3D visualization device system (OpenGL). http://CRAN.R-project.org/package=rgl
Oostenveld, R., and Praamstra, P. (2001). The Five percent electrode system for high-resolution EEG and ERP measurements. Clinical Neurophysiology, 112, 713-719.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ########## EXAMPLE 1 ##########
# plot 10-10 system (default):
eegcapdense()
########## EXAMPLE 2 ##########
# plot 10-20 system:
eegcapdense("10-20", plotlabels = FALSE)
########## EXAMPLE 3 ##########
# plot custom subset of electrodes
myelectrodes <- c("FP1","FP2","FPZ","F7","F3","FZ",
"F4","F8","T7","C3","CZ","C4","T8",
"P7","P3","PZ","P4","P8","O1","O2")
eegcapdense(myelectrodes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.