eelbrain.plot.brain.butterfly

eelbrain.plot.brain.butterfly(y, cmap=None, vmin=None, vmax=None, surf='inflated', views='lateral', hemi=None, w=5, h=2.5, smoothing_steps=None, mask=True, xlim=None, name=None)[source]

Shortcut for a Butterfly-plot with a time-linked brain plot

Parameters:
  • y (NDVar) – Data to plot, with dimensions ([case,] time, source); if y has a case dimension, the mean is plotted. y can also be a testnd t-test result, in which case a masked parameter map is plotted (p ≤ 0.05).

  • cmap (str | ndarray) – Colormap (name of a matplotlib colormap).

  • vmin (float) – Plot data range minimum.

  • vmax (float) – Plot data range maximum.

  • surf (Literal['inflated', 'pial', 'smoothwm', 'sphere', 'white']) – Freesurfer surface to use as brain geometry.

  • views (str | Sequence[str]) – One or several views to show in the figure. The options are: 'lateral', 'medial', 'ventral', 'dorsal', 'rostral', 'parietal', 'frontal', 'caudal'.

  • hemi (Literal['lh', 'rh']) – Plot only this hemisphere (the default is to plot all hemispheres with data in y).

  • w (float) – Butterfly plot width (inches).

  • h (float) – Plot height (inches; applies to butterfly and brain plot).

  • smoothing_steps (int) – Number of smoothing steps if data is spatially undersampled (pysurfer Brain.add_data() argument).

  • mask (bool | str | Sequence[float] | tuple[str, float]) – Shade areas that are not in src. Can be matplotlib color, including alpha (e.g., (1, 1, 1, 0.5) for semi-transparent white). If smoothing is enabled through smoothing_steps, the mask is added as data layer, otherwise it is added as label. To add a mask independently, use the add_mask() method.

  • xlim (float | tuple[float, float]) – Initial x-axis view limits as (left, right) tuple or as length scalar (default is the full x-axis in the data).

  • name (str) – The window title (default is y.name).

Returns:

  • butterfly_plot (plot.Butterfly) – Butterfly plot.

  • brain (Brain) – Brain plot.