eelbrain.plot.brain.SequencePlotter
- class eelbrain.plot.brain.SequencePlotter(subject=None, subjects_dir=None)
Grid of anatomical images in one figure
Notes
For plots with multiple layers, layers are added to the brain in the order they were added to the
SequencePlotter
.Examples
Plot an evoked response or TRF (i.e., a time by source
NDVar
) in 50 ms bins between 0 and 300 ms. Use theextrema()
method to plot peak activity in each time bin:ndvar_binned = ndvar.bin(step=0.050, start=0, stop=0.3, func='extrema') sp = plot.brain.SequencePlotter() sp.set_brain_args(surf='smoothwm') sp.add_ndvar(ndvar_binned) p = sp.plot_table(view='lateral') p.save('Figure.pdf')
Plot specific time points in an evoked response or TRF (
ndvar
):cmap = plot.soft_threshold_colormap('xpolar-a', 0.0001, 0.010) sp = plot.brain.SequencePlotter() sp.set_brain_args(surf='smoothwm') for t in [0.050, 0.100, 0.200]: sp.add_ndvar(ndvar.sub(time=t), cmap=cmap, label=f'{int(t*1000)} ms') p = sp.plot_table(view='lateral', orientation='vertical')
Plot a test result:
res = testnd.TTestRelated('srcm', 'condition') vmax = 3 # explicitly set vmax to make sure that the color-maps agree sp = plot.brain.SequencePlotter() sp.set_brain_args(surf='inflated') sp.add_ndvar(res.c1_mean, vmax=vmax, label='a') sp.add_ndvar(res.c0_mean, vmax=vmax, label = 'b') sp.add_ndvar(res.masked_difference(), vmax=vmax, label='a - b') p = sp.plot_table(view='lateral', orientation='vertical')
Methods
|
Custom modification of the brain object (calls |
|
|
|
Add a data layer to the brain plot |
|
Add a boolean label to the brain plot |
|
|
|
Create a figure with the images |
|
Set the brain model on which to plot |
|
Set parameters for anatomical plot (see |
|
Set the order in which frames are plotted |
|
Set view for all plots (see |