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. The focus is to make a plot that can be
used to see the results clearly and quickly. For publication quality plots, the
functions in freq_plots
are generally preferred.
- 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 phase 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_tristacked(w, h)#
Utility function to easily plot the result from
scipy.signal.freqz()
.The magnitude, phase, and group delay responses are plotted in three 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_tristacked)
- 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)