Plot properties of a filter.
dict
or ndarray
An IIR dict or 1D ndarray of coefficients (for FIR filter).
float
Sample rate of the data (Hz).
None
The ideal response frequencies to plot (must be in ascending order). If None (default), do not plot the ideal response.
None
The ideal response gains to plot. If None (default), do not plot the ideal response.
str
| None
The title to use. If None (default), determine the title based on the type of the system.
The color to use (default ‘#1f77b4’).
tuple
or None
If not None, the x-axis frequency limits (Hz) to use.
If None, freq will be used. If None (default) and freq is None,
(0.1, sfreq / 2.)
will be used.
str
Frequency scaling to use, can be “log” (default) or “linear”.
tuple
The y-axis amplitude limits (dB) to use (default: (-60, 10)).
Show figure if True (default).
If True, compensate for the filter delay (phase will not be shown).
For linear-phase FIR filters, this visualizes the filter coefficients
assuming that the output will be shifted by N // 2
.
For IIR filters, this changes the filter coefficient display by filtering backward and forward, and the frequency response by squaring it.
New in version 0.18.
list
| tuple
| str
A list of the requested plots from time
, magnitude
and
delay
. Default is to plot all three filter properties
(‘time’, ‘magnitude’, ‘delay’).
New in version 0.21.0.
Axes
| list
| None
The axes to plot to. If list, the list must be a list of Axes of
the same length as the number of requested plot types. If instance of
Axes, there must be only one filter property plotted.
Defaults to None
.
New in version 0.21.0.
None
| tuple
The y-axis delay limits (sec) to use (default:
(-tmax / 2., tmax / 2.)
).
New in version 1.1.0.
matplotlib.figure.Figure
The figure containing the plots.
Notes
New in version 0.14.
mne.viz.plot_filter
#Background information on filtering