mne_denoise.viz.plot_component_spectrogram#
- mne_denoise.viz.plot_component_spectrogram(component_data, sfreq, freqs=None, fmax=50.0, n_cycles=None, title='Component Spectrogram', ax=None, show=True, fname=None)[source]#
Plot a time-frequency power view for one component.
- Parameters:
- component_datandarray, shape (n_times,) or (n_epochs, n_times)
Single-component time series or repeated epochs of one component.
- sfreqfloat
Sampling frequency.
- freqsndarray | None
Frequencies to compute. If None, frequencies are generated from 1 Hz to
fmax(capped at Nyquist).- fmaxfloat | None
Upper frequency bound used when
freqsis None. Defaults to 50 Hz to preserve prior behavior.- n_cyclesfloat | ndarray | None
Number of cycles for multitaper estimation.
- titlestr
Axes title.
- axmatplotlib.axes.Axes | None
Optional target axes. If None, a new themed figure is created.
- showbool, default=True
If True, show the figure.
- fnamepath-like | None
Optional output path used to save the figure.
- Returns:
- figmatplotlib.figure.Figure
Figure handle.
- Raises:
- ValueError
If
component_datais not 1D/2D, or iffmaxis not positive whenfreqsis None.