plot
rfnetwork.plots.plot
- rfnetwork.plots.plot(axes, sdata, *paths, ndata=None, fmt='db', freq_unit='ghz', ref=None, label='', label_mode='prefix', lines=None, **kwargs)
Plots s-matrix or noise figure data over frequency.
- Return type:
List[Line2D]
Parameters
- axesplt.Axes
matplotlib axes object
- sdataldarray
Labeled numpy array of s-matrix data with dimensions, (frequency, b, a).
- *pathstuple | int
Port paths to plot. Each path can be an integer or a tuple of port numbers. For example, 21 is equivalent to (2, 1) and plots S21. If no arguments are given every possible path will be plotted.
- ndataldarray
Labeled numpy array of noise correlation matrix with dimensions (frequency, b, a). Used only if fmt is “nf”.
- fmtstr, default: “db”
data format for y-axis data. Accepts the following values - “mag”: Magnitude - “db” : 20log of magnitude - “ang” Phase angle - “ang_unwrap”: Unwrapped phase angle - “vswr” : Voltage standing wave ratio - “real” : Real part of the complex s-matrix data - “imag” : Imaginary part of the complex s-matrix data - “realz” : Real part of the port input impedance - “imagz” : Imaginary part of the port input impedance - “nf” : Noise figure
- freq_unit{“Hz”, “kHz”, “MHz”, “GHz”}, default: “GHz”
Unit for frequency axis.
- reftuple | int
Normalizes all plotted paths to this path. For example, to plot the phase difference between S21 and S31,
.plot(21, ref=31, fmt="ang"). Supports a list of tuples or integers the same length as the number of paths, where each path is normalized to a different reference path.- labelstr | list, default: “”
Legend labels for plotted lines. Supports either a string to add a common label for all lines, or a list of strings for each line.
- label_mode{“prefix”, “suffix”, “override”}, default: “prefix”
Controls the placement of the line labels relative to the default label of “S(b,a)”. By default, labels are a “prefix” to the default label. “override” replaces the default label.
- lineslist[Line2D], optional
Line2D objects for each path. If provided, updates the existing lines instead of drawing new ones on the plot.
- **kwargs
parameters passed into
matplotlib.axes.plot().
Returns
- lineslist[Line2D]
list of line objects that were created for each path. If
linesparameter was used, returned lines are the same as thelinesparameter.