eelbrain.plot._brain_object.Brain.add_ndvar
- Brain.add_ndvar(ndvar, cmap=None, vmin=None, vmax=None, smoothing_steps=None, colorbar=False, time_label='ms', lighting=False, contours=None, alpha=1, remove_existing=False)
Add data layer form an NDVar
- Parameters
ndvar (NDVar ([case,] source[, time])) – NDVar with SourceSpace dimension and optional time dimension. If it contains a
Case
dimension, the average over cases is displayed. Values outside of the source-space, as well as masked values are set to 0, assuming a colormap in which 0 is transparent.cmap (str | list of matplotlib colors | array) – Colormap. Can be the name of a matplotlib colormap, a list of colors, or a custom lookup table (an n x 4 array with RBGA values between 0 and 255).
vmin (float) – Lower endpoint for the colormap. Needs to be set explicitly if
cmap
is a LUT array.vmax (float) – Upper endpoint for the colormap. Needs to be set explicitly if
cmap
is a LUT array.smoothing_steps (int) – Number of smoothing steps if data is spatially undersampled (PySurfer
Brain.add_data()
argument).colorbar (bool) – Add a colorbar to the figure (use
.plot_colorbar()
to plot a colorbar separately).time_label (Union[str, Callable]) – Label to show time point. Use
'ms'
or's'
to display time in milliseconds or in seconds, or supply a custom formatter for time values in seconds (default is'ms'
).lighting (bool) – The data overlay is affected by light sources (default
False
, i.e. data overlays appear luminescent).contours (Union[bool, Sequence[float]]) – Draw contour lines instead of a solid overlay. Set to a list of contour levels or
True
for automatic contours.alpha (float) – Alpha value for the data layer (0 = tranparent, 1 = opaque).
remove_existing (bool) – Remove data layers that have been added previously (default False).