plotting.plot_transfer_function

plotting.plot_transfer_function(
    funcs,
    freqs,
    *,
    names=None,
    phase='rad',
    unwrap=False,
    mag_range=None,
    nyquist=False,
    title=None,
    x_title='$f\\;(\\mathrm{Hz})$',
    height=None,
    width=None,
    showlegend=None,
)

Plot one or more complex functions of frequency.

Parameters

Name Type Description Default
funcs array, callable, or list thereof A complex value array F(freqs), or a callable / transfer-function object evaluated on freqs (e.g. :class:nefes.elements.dynamic_source.TransferFunction). Pass a list to overlay several curves. required
freqs array_like Frequencies [Hz] for the x-axis (and the evaluation grid for callables). required
names list of str Legend names, one per overlaid curve. None
phase (rad, deg) Phase unit (default "rad"); magnitude is always linear. "rad"
unwrap bool Unwrap the phase along frequency (default False, wrapped band). False
mag_range tuple of (lo, hi) Fixed magnitude y-range; default anchors at 0 and scales to the peak. None
nyquist bool If True, draw a Nyquist diagram (imaginary vs real, equal aspect) instead of the magnitude/phase stack (default False). False
title str Figure title. None
x_title str x-axis title for the magnitude/phase layout (default f (Hz)). '$f\\;(\\mathrm{Hz})$'
height int Figure size in pixels. None
width int Figure size in pixels. None
showlegend bool Force the legend on/off (default: on when more than one curve). None

Returns

Name Type Description
plotly.graph_objects.Figure
Back to top