pycrostates.viz.plot_raw_segmentation#

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

Plot raw segmentation.

Parameters:
labelsarray of shape (n_samples,)

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

rawRaw

MNE Raw instance.

n_clustersint

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

cluster_nameslist | None

Name of the clusters.

tminfloat

Start time of the raw data to use in seconds (must be >= 0).

tmaxfloat | None

End time of the raw data to use in seconds (cannot exceed data duration). If None (default), the current end of the data is used.

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(s) on which topographic maps are plotted.