mplsignal.scipyplot
#
The module contains utility functions to easily interact with SciPy.
The SciPy functions scipy.signal.freqs()
and scipy.signal.freqz()
have a plot argument to provide a plotting callback function.
The functions provided in this module is aimed to be used as such a callback.
- mplsignal.scipyplot.freqz(w, h)#
Utility function to easily plot the result from
scipy.signal.freqz()
.The magnitude and phase responses are plotted in two different subplots.
- Parameters:
- warray-like
Frequency points.
- harray-like
Transfer function evaluated at w.
- Returns:
- None.
See also
Examples
>>> from scipy import signal ... from mplsignal import scipyplot ... ... signal.freqz([1, 1, 1, 1], plot=scipyplot.freqz)
- mplsignal.scipyplot.freqz_magnitude(w, h)#
Utility function to easily plot the result from
scipy.signal.freqz()
.Only the magnitude is plotted.
- Parameters:
- warray-like
Frequency points.
- harray-like
Transfer function evaluated at w.
- Returns:
- None.
See also
Examples
>>> from scipy import signal ... from mplsignal import scipyplot ... ... signal.freqz([1, 1, 1, 1], plot=scipyplot.freqz_magnitude)
- mplsignal.scipyplot.freqz_phase(w, h)#
Utility function to easily plot the result from
scipy.signal.freqz()
.Only the magnitude is plotted.
- Parameters:
- warray-like
Frequency points.
- harray-like
Transfer function evaluated at w.
- Returns:
- None.
See also
Examples
>>> from scipy import signal ... from mplsignal import scipyplot ... ... signal.freqz([1, 1, 1, 1], plot=scipyplot.freqz_phase)
- mplsignal.scipyplot.freqz_twin(w, h)#
Utility function to easily plot the result from
scipy.signal.freqz()
.The magnitude and phase responses are plotted in the same plot using different y-axes.
- Parameters:
- warray-like
Frequency points.
- harray-like
Transfer function evaluated at w.
- Returns:
- None.
See also
Examples
>>> from scipy import signal ... from mplsignal import scipyplot ... ... signal.freqz([1, 1, 1, 1], plot=scipyplot.freqz_twin)