skrf.vectorFitting.VectorFitting.plot

VectorFitting.plot(component, i=-1, j=-1, freqs=None, parameter='s', *, ax=None)[source]

Plots the specified component of the parameter \(H_{i+1,j+1}\) in the fit, where \(H\) is either the scattering (\(S\)), the impedance (\(Z\)), or the admittance (\(H\)) response specified in parameter.

Parameters:
  • component (str) – The component to be plotted. Must be one of the following items: [‘db’, ‘mag’, ‘deg’, ‘deg_unwrap’, ‘re’, ‘im’]. db for magnitude in decibels, mag for magnitude in linear scale, deg for phase in degrees (wrapped), deg_unwrap for phase in degrees (unwrapped/continuous), re for real part in linear scale, im for imaginary part in linear scale.

  • i (int, optional) – Row index of the response. -1 to plot all rows.

  • j (int, optional) – Column index of the response. -1 to plot all columns.

  • freqs (list of float or ndarray or None, optional) – List of frequencies for the response plot. If None, the sample frequencies of the fitted network in network are used. This only works if network is not None.

  • parameter (str, optional) – The network representation to be used. This is only relevant for the plot of the original sampled response in network that is used for comparison with the fit. Must be one of the following items unless network is None: [‘s’, ‘z’, ‘y’] for scattering (default), impedance, or admittance.

  • ax (matplotlib.Axes object or None) – matplotlib axes to draw on. If None, the current axes is fetched with gca().

Returns:

matplotlib axes used for drawing. Either the passed ax argument or the one fetch from the current figure.

Return type:

matplotlib.Axes

Raises:

ValueError – If the freqs parameter is not specified while the Network in network is None. Also if component and/or parameter are not valid.