Skip to main content

An extension for matplotlib providing a projection class to generate high quality Smith Chart plots.

Project description

mpl-smithchart

ci

This project is forked from pySmithPlot. It adds CI/CD automation to facilitate maintenance of the package.

Below this line is the old README.

New Release of Version 0.2

After 2 years of getting dusty pySmithPlot now got some new features and bug fixes. Here is a short changelog:

  • Support for Python 3
  • improved grid generation algorithm
  • plot() now also handles also single numbers and purely real data
  • plot() can now interpolate lines between points or generate an equidistant spacing
  • changed handling of input data and renormalization; now the actual datatype (S,Z,Y-Parameter) can be specified when calling plot()
  • changed behaviour for normalization and placement of the label
  • added some parameter checks
  • removed default matplotlib settings
  • renamed some parameters to improve consistency
  • fixed issues with Unicode symbols
  • fixed issues with grid generation
  • fixed issues with axis label display and placement

There are still some plans for the future and they hopefully don't take another two years:

  • support for Admittance Charts
  • support for contour() plots
  • zoom and 'cut out' function
  • special handling of other matplotlib.patch objects like arrows
  • ...

Features

pySmithPlot is a matplotlib extension providing a projection class for creating high quality Smith Charts with Python. The generated plots blend seamless into matplotlib's style and support almost the full range of customization options.

This Library allows the fully automatic generation of Smith Charts with various customizable parameters and well selected default values. It also provides the following modifications and extensions:

  • circle shaped drawing area with labels placed around
  • plot() accepts real and complex numbers as well as numpy.ndarray's
  • lines can be automatically interpolated to improve the optical appearance
  • data ranges can be interpolated to an equidistant spacing
  • start/end markers of lines can be modified and rotate tangential
  • gridlines are 3-point arcs to improve space efficiency of exported plots
  • 'fancy' option for adaptive grid generation
  • own tick locators for nice axis labels

For making a Smith Chart plot, it is sufficient to import smithplot and create a new subplot with projection set to 'smith'. (Requires matplotlib version 1.2)

A short example can be found in the testbenches directory and started with:

python3 smith_short_test.py

For more details and documentation, take a look into smithplot/smithaxes.py.

testbenches/smith_full_test.py runs various testbenches and gives a comparison for almost all parameters. These are the generated sample plots:

Grid Styles Grid Styles - PDF

Fancy Threshold Fancy Threshold - PDF

Grid Locators Grid Locators - PDF

Marker Modification Marker Modification - PDF

Interpolation Interpolation - PDF

Normalize Normalize - PDF

Miscellaneous Miscellaneous - PDF

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

mpl-smithchart-0.1.1.tar.gz (53.2 kB view details)

Uploaded Source

Built Distribution

mpl_smithchart-0.1.1-py3-none-any.whl (19.6 kB view details)

Uploaded Python 3

File details

Details for the file mpl-smithchart-0.1.1.tar.gz.

File metadata

  • Download URL: mpl-smithchart-0.1.1.tar.gz
  • Upload date:
  • Size: 53.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.5.5 CPython/3.10.11

File hashes

Hashes for mpl-smithchart-0.1.1.tar.gz
Algorithm Hash digest
SHA256 d60e975eb08c6d7b7c8cfc9c0a3767026caae3f7787bccdbb4184f1f25cd3457
MD5 62393983b6d82705955a4a0da5d0708c
BLAKE2b-256 ebaea255638a567fdd6eb10a724538786bc3eebf63830be3f3a2a52f5a6685e8

See more details on using hashes here.

Provenance

File details

Details for the file mpl_smithchart-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mpl_smithchart-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 edc2d8fba15c4dca6c3717a99ec4e65230c34c7261145afa3acc5636e9521a70
MD5 f4642539f425260f5607b7d48e49fb4f
BLAKE2b-256 7b65019d34aa1ce7568be5392adc8660013fc706619eebdbb6b0015cb3c63963

See more details on using hashes here.

Provenance

Supported by

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