Plot data (group)
Last updated
Last updated
This function plots TMS-evoked activity averaged over participants. Timing of the TMS pulse is indicated with a red dashed line. Confidence intervals across participants can also be plotted.
To use this function, all of the participant files must be in the same folder and all files must have undergone identical tesa_peakanalysis runs or have the same electrodes. No other files should be in this folder. Open one file from the folder and run the function on this file and all files in the folder will be averaged and plotted.
Example group plot for a region of interest analysis with confidence intervals. Data are averaged across three individuals.
1. Select the data to plot. All will plot a butterfly plot with all electrodes. Individual electrodes can be selected, as well as ROI and GMFA analyses.
2. Define the time limits for the x axis (in ms).
3. Define the amplitude limits for the y axis (in uV). Leave blank for auto-scaling.
4. Turn on/off 95% confidence intervals calculated across trials. This is only available for single electrode and ROI plots.
pop_tesa_plotgroup(EEG, 'xlim', [-200,600], 'ylim', [-10,10], 'elec', 'P1', 'CI', 'on');
Plot electrode P1, rescale the axes and include confidence intervals.
pop_tesa_plotgroup(EEG, 'tepType','ROI','tepName','parietal','CI','on');
Plot the output from a ROI analysis called parietal including detected peaks and confidence intervals.
pop_tesa_plotgroup(EEG, 'tepType','GMFA');
Plot output from a GMFA analysis including detected peaks.
Input
Description
Example
Default
EEG
EEGLAB EEG structure
EEG
-
Key
Input value
Description
Example
Default
'xlim'
[min,max]
Integers describing the x axis limits in ms.
[-200,600]
[-100,500]
'ylim'
[min,max]
Integers describing the y axis limits in ms. If left blank, the plot will automatically scale.
[-10,10]
[ ]
'elec'
'string'
String describing a single electrode for plotting. If left blank, a butterfly plot of all electrodes will be plotted.
'Cz'
[ ]
'CI'
'on' or 'off'
Plot confidence interval calculated across trials. This option is not available for GMFA and butterfly plots.
'on'
'off'
Options for plotting output from tesa_tepextract and tesa_peakanalysis
'tepType'
'data' or 'ROI' or 'GMFA'
'data' input extracts data for plotting from EEG.data. 'ROI' input selects a ROI generated by tesa_tepextract. 'GMFA' input selects a GMFA generated by tesa_tepextract. Note that if multiple ROIs or GMFAs are present, 'tepName' must also be included to determine which one to plot.
'ROI'
'data'
'tepName'
'string'
String is either the name of a ROI or GMFA generated by tesa_tepextract. The default names generated by tesa_tepextract are 'R1','R2'... etc. however the user can also define names. This is required if multiple ROIs or GMFAs are present.
'motor'
[ ]