pycrostates.viz.plot_epoch_segmentation#

pycrostates.viz.plot_epoch_segmentation(labels, epochs, n_clusters, cluster_names=None, cmap=None, axes=None, cbar_axes=None, *, block=False, show=None, verbose=None, **kwargs)[source]#

Plot epochs segmentation.

Parameters:
labelsarray of shape (n_epochs, n_samples)

Microstates labels attributed to each sample, i.e. the segmentation.

epochsEpochs

MNE Epochs instance.

n_clustersint

The number of clusters, i.e. the number of microstates.

cluster_nameslist | None

Name of the clusters.

cmapstr | colormap | None

The colormap to use. If None, viridis is used.

axesAxes | None

Either None to create a new figure or axes on which the segmentation is plotted.

cbar_axesAxes | None

Axes on which to draw the colorbar, otherwise the colormap takes space from the main axes.

blockbool

Whether to halt program execution until the figure is closed.

showbool | None

If True, the figure is shown. If None, the figure is shown if the matplotlib backend is interactive.

verboseint | str | bool | None

Sets the verbosity level. The verbosity increases gradually between "CRITICAL", "ERROR", "WARNING", "INFO" and "DEBUG". If None is provided, the verbosity is set to "WARNING". If a bool is provided, the verbosity is set to "WARNING" for False and to "INFO" for True.

**kwargs

Kwargs are passed to axes.plot.

Returns:
figFigure

Matplotlib figure on which topographic maps are plotted.