NeuroAnalyzer tutorials: Plot topographical maps
Initialize NeuroAnalyzer
using NeuroAnalyzer
using Plots
eeg = load("files/eeg.hdf");Plot topomap:
plot_topo(eeg,
ch="eeg")To generate a small topomap:
plot_topo(eeg,
ch="eeg",
large=false)GKS: Character height is invalid in routine SET_TEXT_HEIGHT
GKS: Character height is invalid in routine SET_TEXT_HEIGHT
GKS: Character height is invalid in routine SET_TEXT_HEIGHT
Several interpolation methods are available:
:sh: Shepard – default:mq: Multiquadratic:imq: Inverse Multiquadratic:tp: ThinPlate:nn: NearestNeighbour:ga: Gaussian
plot_topo(eeg,
ch="eeg",
imethod=:sh,
title="Shepard")plot_topo(eeg,
ch="eeg",
imethod=:mq,
title="Multiquadratic")plot_topo(eeg,
ch="eeg",
imethod=:imq,
title="Inverse Multiquadratic")plot_topo(eeg,
ch="eeg",
imethod=:tp,
title="ThinPlate")plot_topo(eeg,
ch="eeg",
imethod=:nn,
title="NearestNeighbour")plot_topo(eeg,
ch="eeg",
imethod=:ga,
title="Gaussian")All plots show topomap of the signal averaged over time window 0:10 s.
Plot weights
Default threshold type is :neq (not equal):
plot_locs(eeg,
ch="eeg",
weights=rand(-1:0.1:1, 19),
threshold=0.5)Plot connections
Draw connections that have value > 0.95:
plot_locs(eeg,
ch="eeg",
connections=rand(19, 19),
threshold_type=:g,
threshold=0.95)Connections and weights can be plotted for top (XY) (default), front (XZ) and side (YZ) planes.
Top view:
plot_locs(eeg,
ch="eeg",
ch_labels=false,
connections=rand(19, 19),
threshold_type=:g,
threshold=0.95,
plane=:xy)Front view:
plot_locs(eeg,
ch="eeg",
ch_labels=false,
connections=rand(19, 19),
threshold_type=:g,
threshold=0.95,
plane=:xz)(!) It is recommended to disable channel labels for legibility.
Side view:
plot_locs(eeg,
ch="eeg",
ch_labels=false,
connections=rand(19, 19),
threshold_type=:g,
threshold=0.95,
plane=:yz)(!) It is recommended to disable channel labels for legibility.
Connectivity circle
Connections can also be visualized using connectivity circle:
l = get_channel(eeg, type="eeg")
# we use fake connectivity matrix here
m = rand(-10:0.1:10, length(l), length(l))
p = plot_connectivity_circle(m,
clabels=l,
threshold_type=:geq,
threshold=2)(!) Only the upper triangular part of the connectivity matrix is used. Normally it should be symmetrical. If not (in the case of bidirectional data), consider drawing two plots, one for the upper triangle and another for the transposed matrix (m').
(!) Positive values are drawn in red, negative values in blue.
(!) Relative connections widths represent connections values.
p = plot_connectivity_circle(m,
clabels=l,
threshold_type=:leq,
threshold=-2)