mne.viz.plot_ica_sources

mne.viz.plot_ica_sources(ica, inst, picks=None, exclude=None, start=None, stop=None, title=None, show=True, block=False, show_first_samp=False)[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:

ica : instance of mne.preprocessing.ICA

The ICA solution.

inst : instance of mne.io.Raw, mne.Epochs, mne.Evoked

The object to plot the sources from.

picks : int | array_like of int | None.

The components to be displayed. If None, plot will show the sources in the order as fitted.

exclude : array_like of int

The components marked for exclusion. If None (default), ICA.exclude will be used.

start : int

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

stop : int

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

title : str | None

The figure title. If None a default is provided.

show : bool

Show figure if True.

block : bool

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_samp : bool

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

Returns:

fig : instance of pyplot.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.