enigmatoolbox.plotting.surface_plotting.plot_cortical(array_name=None, surface_name='fsa5', color_bar=False, color_range=None, label_text=None, cmap='RdBu_r', nan_color=(1, 1, 1, 0), zoom=1, background=(1, 1, 1), size=(400, 400), interactive=True, embed_nb=False, screenshot=False, filename=None, scale=(1, 1), transparent_bg=True, **kwargs)[source]

Plot cortical surface with lateral and medial views (authors: @OualidBenkarim, @saratheriver)

  • array_name (str, list of str, ndarray or list of ndarray, optional) – Name of point data array to plot. If ndarray, the array is split for the left and right hemispheres. If list, plot one row per array. Default is None.
  • surface_name (str, optional) – Name of surface {‘fsa5’, ‘conte69}. Default is ‘fsa5’.
  • color_bar (bool, optional) – Plot color bar for each array (row). Default is False.
  • color_range ({'sym'}, tuple or sequence.) – Range for each array name. If ‘sym’, uses a symmetric range. Only used if array has positive and negative values. Default is None.
  • label_text (dict[str, array-like], optional) – Label text for column/row. Possible keys are {‘left’, ‘right’, ‘top’, ‘bottom’}, which indicate the location. Default is None.
  • nan_color (tuple) – Color for nan values. Default is (1, 1, 1, 0).
  • zoom (float or sequence of float, optional) – Zoom applied to the surfaces in each layout entry.
  • background (tuple) – Background color. Default is (1, 1, 1).
  • cmap (str, optional) – Colormap name (from matplotlib). Default is ‘RdBu_r’.
  • size (tuple, optional) – Window size. Default is (400, 400).
  • interactive (bool, optional) – Whether to enable interaction. Default is True.
  • embed_nb (bool, optional) – Whether to embed figure in notebook. Only used if running in a notebook. Default is False.
  • screenshot (bool, optional) – Take a screenshot instead of rendering. Default is False.
  • filename (str, optional) – Filename to save the screenshot. Default is None.
  • transparent_bg (bool, optional) – Whether to us a transparent background. Only used if screenshot==True. Default is False.
  • scale (tuple, optional) – Scale (magnification). Only used if screenshot==True. Default is None.
  • kwargs (keyword-valued args) – Additional arguments passed to the plotter.

figure – Figure to plot. None if using vtk for rendering (i.e., embed_nb == False).

Return type:

Ipython Image or None