mne_denoise.viz.plot_component_epochs_image#
- mne_denoise.viz.plot_component_epochs_image(estimator, data=None, n_components=None, show=True, fname=None)[source]#
Plot component activity as an epoch-by-time image.
- Parameters:
estimator (object) – Fitted estimator exposing component sources via cache or transform.
data (mne.io.BaseRaw | mne.BaseEpochs | ndarray | None) – Input data used to compute sources when they are not cached.
n_components (int | sequence of int | None) – Components to plot. If None, plot up to five components.
show (bool, default=True) – If True, show the figure.
fname (path-like | None) – Optional output path used to save the figure.
- Returns:
fig – Figure handle.
- Return type:
- Raises:
ValueError – If sources are not 2D/3D, or if no components are selected.
Notes
Input source shapes are interpreted as:
(n_components, n_times)for a single average/time series.(n_components, n_times, n_epochs)for epoched sources.
Examples
>>> from mne_denoise.viz import plot_component_epochs_image >>> fig = plot_component_epochs_image( ... estimator, data=epochs, n_components=[0, 1], show=False ... )