ltopo.conn: LUNA plotting

View source: R/luna.R

ltopo.connR Documentation

LUNA plotting

Description

draw a connectivity topoplot (i.e. of lines between pairs of channels)

Usage

ltopo.conn(
  chs1,
  chs2,
  z,
  flt = T,
  zr = range(z[flt], na.rm = T),
  cex = 2,
  w = 8,
  title = "",
  head = T,
  signed = F
)

Arguments

chs1

channel a

chs2

channel b

z

numeric vector - the associated value for the pair (a,b)

flt

optional boolean vector of length(z) - only plot values that are T here

zr

range of Z axis

cex

size of points (default 2)

w

width of lines (defauly 8)

title

main title text (default "")

head

boolean value: if T, plot a simple head outline

signed

boolean value: if T, assume Z values are signed and show directions in plots

Value

plot is generated in the current graphics device; no return value

Note

  • lines are drawn in ascending order of the absolute value of z - i.e. so that larger values are more evident on the plot. Note that this plot can take a long time and give very indistinct figures if too many pairs are included - use the filter f argument to restrict visualization to only the most relevant sets of pairs

  • if signed equals T, then the lines connecting two channels are drawn using a gradient of 'red-to-white-to-blue' going from one channel to the second, depending on the sign of Z, such that if Z(A,B) = +2, then the line at channel 'A' is blue, whereas the end at 'B' will be red (e.g. implying a flow of information "from A to B"). If Z(a,b) = -2, the opposite will be rendered.

  • if signed is F, then all lines are of the same, solid color. The intention of the signed option is to be able to visually represent directed connectivity metrics (e.g. PSI), in contrast to undirected metrics such as magnitude squared coherence.

Examples

## Not run: 
ltopo.conn(chs1 = coh$CH1, chs2 = coh$CH2, z = coh$ICOH,
    flt = coh$B == "SIGMA" & coh$COH > 0.7, w = 5, signed = T)

## End(Not run)


remnrem/luna documentation built on June 1, 2025, 2:14 p.m.