coco_pipe.viz.plot_topomap#

coco_pipe.viz.plot_topomap(values, coords=None, index=None, info=None, vmin=None, vmax=None, cmap=None, sensors='markers', outlines=True, contours=0, symmetric=True, title=None, cbar=True, cbar_label=None, figsize=(5, 5), ax=None, **_)#

Plot a topographic map for sensor values using MNE.

Parameters:
  • values (Series | Mapping[str, float] | Sequence[float]) – Sensor values to plot. A Series or mapping must be keyed by sensor name; a plain sequence requires index or coords/info to supply the names.

  • coords – Sensor coordinate source: an MNE-style (N, 2+) array, a {name: (x, y)} mapping, or a DataFrame with x and y columns and sensor names in the index or a FeatureName / Sensor column.

  • index (Sequence[str] | None) – Explicit sensor name list used when values is a plain sequence.

  • info – MNE Info object from which electrode positions are extracted. Takes priority over coords.

  • vmin (float | None) – Colormap lower bound. Computed symmetrically when symmetric=True.

  • vmax (float | None) – Colormap upper bound. Computed symmetrically when symmetric=True.

  • cmap (str | None) – Colormap name. Defaults to the diverging theme map when symmetric=True, otherwise the sequential map.

  • sensors (str) – "markers" to show sensor dots, "labels" to annotate each sensor, or "none" to hide sensors.

  • outlines (bool) – Whether to draw the head outline.

  • contours (int) – Number of contour lines drawn over the topomap.

  • symmetric (bool) – Derive vmin/vmax symmetrically around zero.

  • title (str | None) – Optional axes title.

  • cbar (bool) – Whether to attach a colorbar.

  • cbar_label (str | None) – Optional colorbar label.

  • figsize (tuple[float, float]) – Figure size used when creating new axes.

  • ax (Axes | None) – Existing Matplotlib axes to draw into.

  • _ (object)

Returns:

The created or reused figure and axes.

Return type:

tuple[matplotlib.figure.Figure, matplotlib.axes.Axes]