Skip to main content

A Python library extending Matplotlib to generate Smith Charts.

Project description

PyPI GitHub Conda doi

License Testing Documentation Downloads

Try Online

pysmithchart is a Python library that provides high-quality Smith charts for RF and microwave engineering applications. Built as a native extension to matplotlib, it enables reproducible analysis and publication-ready visualization of reflection coefficients, impedances, and admittances commonly encountered in transmission-line theory, antenna characterization, and network analysis.

Smith charts remain a foundational tool in RF engineering, and this library is designed to support both instructional use and research workflows. By integrating directly with matplotlib’s projection system, pysmithchart enables familiar plotting syntax while offering fine-grained control of chart geometry, grid styling, interpolation, and layout.

Smith Chart Example

This project originated from pySmithPlot by Paul Staerke. It has been completely rewritten so any issues are not his.


Features

  • Seamless matplotlib integration — implemented as a projection; compatible with standard plotting workflows

  • Support for common RF quantities — reflection coefficients, impedances, admittances, and S-parameters

  • Configurable analytical grids — control spacing, style, and precision of constant-R and constant-X curves

  • Interpolation utilities — optional smoothing and resampling of complex-valued datasets

  • Custom marker rotation — useful for frequency-indexed trajectories and multi-point measurement data

  • Publication-quality output — full control over fonts, colors, annotations, and line styling

Installation

Using pip:

pip install pysmithchart

Using conda:

conda install -c conda-forge pysmithchart

Quick Start

Reflection Coefficients (S-Parameters)

import matplotlib.pyplot as plt
from pysmithchart import R_DOMAIN

S = [0.5 + 0.3j, -0.2 - 0.1j]

plt.figure(figsize=(6, 6))
plt.subplot(1, 1, 1, projection="smith")
plt.plot(S, domain=R_DOMAIN, marker='o', markersize=10, label='S₁₁')
plt.legend()
plt.title('Reflection Coefficients')
plt.show()
simple smithchart

Normalized Impedance Example

import matplotlib.pyplot as plt
import pysmithchart

ZL = [30 + 30j, 50 + 50j, 100 + 100j]

sc = {"grid.Z.minor_enable":True}
plt.figure(figsize=(6, 6))
ax = plt.subplot(1, 1, 1, projection="smith", Z0=200, **sc)
plt.plot(ZL, "b-o", markersize=10, label='Load Impedance')
plt.legend()
plt.title('Impedances with Z₀ = 200Ω')
plt.show()
simple impedance example

Documentation

Comprehensive documentation, including the API reference, tutorials, theoretical background, and worked examples, is available at:

https://pysmithchart.readthedocs.io

A live, browser-based environment powered by JupyterLite is available for experimentation without installation:

https://scottprahl.github.io/pysmithchart/

License

pysmithchart is released under the BSD-3 Clause License.

Citation

If you use pysmithchart in academic or technical work, please cite:

Prahl, S. (2026). pysmithchart: A Python module for Smith charts (Version 0.6.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.8370821

BibTeX

@software{pygrin_prahl_2026,
  author    = {Scott Prahl},
  title     = {pysmithchart: A Python module for Smith charts},
  year      = {2026},
  version   = {0.6.0},
  doi       = {10.5281/zenodo.8370821},
  url       = {https://github.com/scottprahl/pygrin},
  publisher = {Zenodo}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysmithchart-0.9.0.tar.gz (117.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysmithchart-0.9.0-py3-none-any.whl (53.2 kB view details)

Uploaded Python 3

File details

Details for the file pysmithchart-0.9.0.tar.gz.

File metadata

  • Download URL: pysmithchart-0.9.0.tar.gz
  • Upload date:
  • Size: 117.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pysmithchart-0.9.0.tar.gz
Algorithm Hash digest
SHA256 8811610e2f83ed44799eaee3b22cae18f102989db949935b291a846b6c3a5203
MD5 75a14cfccfd854bf943e42ca5e890033
BLAKE2b-256 18174781ddbdd8ce027bda9ef02fce1a350211cb3456df2419790de4d86852da

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysmithchart-0.9.0.tar.gz:

Publisher: pypi.yaml on scottprahl/pysmithchart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pysmithchart-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: pysmithchart-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 53.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pysmithchart-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae82bd88c541309013ca554b083cc17d74c673aacae78a4ac99e2d4977b2b7d0
MD5 f07eebcce2328f89dcadf04ca1eabb07
BLAKE2b-256 ee497a1cdf98cd067e5390f16bf0855e32fd1c016c77d8d9770c3ae95d5e57b6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysmithchart-0.9.0-py3-none-any.whl:

Publisher: pypi.yaml on scottprahl/pysmithchart

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page