mne.viz.plot_ideal_filter

mne.viz.plot_ideal_filter(freq, gain, axes=None, title='', flim=None, fscale='log', alim=(- 80, 10), color='r', alpha=0.5, linestyle='--', show=True)[source]

Plot an ideal filter response.

Parameters
freqarray_like

The ideal response frequencies to plot (must be in ascending order).

gainarray_like or None

The ideal response gains to plot.

axesinstance of Axes | None

The subplot handle. With None (default), axes are created.

titlestr

The title to use, (default: ‘’).

flimtuple or None

If not None, the x-axis frequency limits (Hz) to use. If None (default), freq used.

fscalestr

Frequency scaling to use, can be “log” (default) or “linear”.

alimtuple

If not None (default), the y-axis limits (dB) to use.

colorcolor object

The color to use (default: ‘r’).

alphafloat

The alpha to use (default: 0.5).

linestylestr

The line style to use (default: ‘–‘).

showbool

Show figure if True (default).

Returns
figinstance of matplotlib.figure.Figure

The figure.

See also

plot_filter

Notes

New in version 0.14.

Examples

Plot a simple ideal band-pass filter:

>>> from mne.viz import plot_ideal_filter
>>> freq = [0, 1, 40, 50]
>>> gain = [0, 1, 1, 0]
>>> plot_ideal_filter(freq, gain, flim=(0.1, 100))  
<...Figure...>

Examples using mne.viz.plot_ideal_filter