eelbrain.plot._brain_object.Brain.add_ndvar_annotation

Brain.add_ndvar_annotation(self, ndvar, colors=None, borders=True, alpha=1, lighting=True)

Add annotation from labels in an NDVar

Parameters:
ndvar : NDVar of int

NDVar in which each unique integer indicates a label. By default, 0 is interpreted as unlabeled, but this can be overridden by providing a colors dictionary that contains an entry for 0.

colors : dict

Dictionary mapping label IDs to colors.

borders : bool | int

Show label borders (instead of solid labels). If int, specify the border width.

alpha : scalar [0, 1]

Opacity of the labels (default 1).

lighting : bool

Labels are affected by lights (default True).