eelbrain.plot.brain.SequencePlotter¶
-
class
eelbrain.plot.brain.
SequencePlotter
¶ Grid of anatomical images in one figure
Examples
Plot an evoked response or TRF (time by source
ndvar
) in 50 ms bins:ndvar_binned = ndvar.bin(0.05, 0, 0.3, '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.SequancePlotter() 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 |