mne.viz.plot_ica_sources

mne.viz.plot_ica_sources(ica, inst, picks=None, exclude='deprecated', start=None, stop=None, title=None, show=True, block=False, show_first_samp=False, show_scrollbars=True)[source]

Plot estimated latent sources given the unmixing matrix.

Typical usecases:

  1. plot evolution of latent sources over time based on (Raw input)

  2. plot latent source around event related time windows (Epochs input)

  3. plot time-locking in ICA space (Evoked input)

Parameters
icainstance of mne.preprocessing.ICA

The ICA solution.

instinstance of mne.io.Raw, mne.Epochs, mne.Evoked

The object to plot the sources from.

picksstr | list | slice | None

Channels to include. Slices and lists of integers will be interpreted as channel indices. In lists, channel type strings (e.g., ['meg', 'eeg']) will pick channels of those types, channel name strings (e.g., ['MEG0111', 'MEG2623'] will pick the given channels. Can also be the string values “all” to pick all channels, or “data” to pick data channels. None (default) will pick all sources in the order as fitted.

exclude‘deprecated’

The exclude parameter is deprecated and will be removed in version 0.20; specify excluded components using the ICA.exclude attribute instead.

startint

X-axis start index. If None, from the beginning.

stopint

X-axis stop index. If None, next 20 are shown, in case of evoked to the end.

titlestr | None

The window title. If None a default is provided.

showbool

Show figure if True.

blockbool

Whether to halt program execution until the figure is closed. Useful for interactive selection of components in raw and epoch plotter. For evoked, this parameter has no effect. Defaults to False.

show_first_sampbool

If True, show time axis relative to the raw.first_samp.

show_scrollbarsbool

Whether to show scrollbars when the plot is initialized. Can be toggled after initialization by pressing z (“zen mode”) while the plot window is focused. Default is True.

New in version 0.19.0.

Returns
figinstance of Figure

The figure.

Notes

For raw and epoch instances, it is possible to select components for exclusion by clicking on the line. The selected components are added to ica.exclude on close.

New in version 0.10.0.