kicad2ems.core.plots

Plots as matplotlib Figures (no pyplot, no backend state: a GUI can embed them,
save() writes a PNG):
model + mesh preview, transmission-line sections, S-parameters (with overlays),
convergence, antenna.
kicad2ems.core.plots.plot_antenna(f, s11, z0, res, title)[source]
Input match (|S11|, input impedance) and gain / directivity / efficiency
over frequency.
kicad2ems.core.plots.plot_convergence(f, levels, names, title, floor_db=-40.0)[source]
|S| in dB on every mesh level (one colour per parameter, one line style
per level) and, below, the deviation from the finest level. levels: [(label,
S (nf, n, n)), ...] coarse to fine.
kicad2ems.core.plots.plot_lines(lm, m, title='')[source]
Layout map of the sections (coloured by Z0, numbered along each path) and
the impedance profile along each path (Z0 against the distance from its
first port). None without paths.
kicad2ems.core.plots.plot_pattern(res, title, floor_db=-30.0)[source]
Gain cuts (polar, dBi) and the 3D gain pattern at the pattern
frequency.
kicad2ems.core.plots.plot_results(f, S, names, title, overlays=(), label='openEMS')[source]
|S| in dB (all parameters) and the reflections on a Smith chart.
overlays: [(f, S, label, style)] drawn in the same colours (e.g. a
Touchstone file to compare, the fast line model).
kicad2ems.core.plots.preview(m, mesh, title='')[source]
Each modelled copper layer from above and the stack from the side; with
an openEMS mesh, its lines (vias and walls where the mesh put them). mesh
None: the board alone.
kicad2ems.core.plots.save(fig, path, dpi=130)[source]
Write a figure to a PNG.