Render a Smith chart (PNG / SVG)
render_smith_chartDraw publication-quality Smith charts as PNG or SVG, adding circuit arcs, impedance points, VSWR circles, Q contours, S-parameter traces, and amplifier overlays.
Instructions
Draw a publication-quality Smith chart and return it as an image (PNG, via resvg) and/or SVG. Layers (all optional, combine freely): a circuit (load + components listed load → source) drawn as the classic constant-R / constant-G / transmission-line arcs with a node marker per component, plus an optional frequency-sweep trace of the input; impedance or Γ points; VSWR circles; constant-Q contours; arbitrary circles (e.g. from gain_circles / noise_circles / amplifier_stability, centre given as Γ); an S11/S22 locus from a Touchstone file; and amplifier overlays computed from a device (stability circles with the unstable side shaded, available/operating gain circles, noise-figure circles). Impedance, admittance or combined grid; light or dark theme; optional output_path to also save the file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| z0 | No | Chart reference impedance Z0 (Ω). | |
| grid | No | Grid type: Z chart, Y chart or combined ZY chart. | both |
| size | No | Chart width in px. | |
| theme | No | light | |
| title | No | Chart title. | |
| format | No | Returned image format. | png |
| points | No | Individual impedances (z) or reflection coefficients (gamma) to mark. | |
| circles | No | Arbitrary circles in the Γ plane. | |
| circuit | No | Circuit to draw as Smith chart arcs (same format as analyze_circuit). | |
| language | No | Language of the human-readable summary: 'en' (English) or 'tr' (Türkçe). Defaults to the server setting. | |
| amplifier | No | Amplifier overlays computed from a two-port. | |
| png_scale | No | PNG pixel density multiplier (2 = crisp on HiDPI; 1 = smaller payload). | |
| q_contours | No | Constant-Q contours (|X|/R = Q), e.g. [1, 2, 5]. | |
| output_path | No | Absolute file path to also write the image to (.png or .svg; with format 'both' both files are written). | |
| vswr_circles | No | Constant-VSWR circles to draw, e.g. [1.5, 2, 3]. | |
| touchstone_trace | No | Plot the S11 (or S22) locus of a Touchstone file, e.g. a measured antenna. |