Plotting tools for complex-valued functions
Project description
cplot
Plotting complex-valued functions.
cplot is an attempt at encoding complex-valued data in colors. The general idea is to map the absolute value to lightness and the complex argument (the "angle") to the chroma of the representing color.
The representation is chosen such that
- values around 0 are black,
- values around infinity are white,
- values around +1 are green,
- values around -1 are red,
- values around +i are blue, and
- values around -i are yellow.
See below for examples with some well-known functions.
import cplot
import numpy
cplot.show(numpy.tan, -5, +5, -5, +5, 100, 100)
# There is a tripcolor function as well for triangulated 2D domains
# cplot.tripcolor(triang, z)
|
|
:-------------------:|:------------------:|:----------:|
z**1
| z**2
| z**3
|
|
|
:-------------------:|:------------------:|:-------------------:|
1/z
| (z+1) / (z-1)
| (z-1) / (z+1)
|
|
|
:-------------------:|:------------------:|:-------------------------:|
numpy.sin
| numpy.cos
| numpy.tan
|
|
|
:-------------------:|:------------------:|:-------------------------:|
numpy.exp
| numpy.log
| scipy.special.gamma
|
Testing
To run the cplot unit tests, check out this repository and type
pytest
Distribution
To create a new release
-
bump the
__version__
number, -
tag and upload to PyPi:
make publish
License
cplot is published under the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cplot-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be210912d63400233578bf1c3570eded5de9de6c17cbc9c91ea2b4f56c3de3db |
|
MD5 | ff728dc1b6506e51a05a0a1bca82b9ac |
|
BLAKE2b-256 | ae5d7057559749b9403bf11f8f308cd1944b0d51218e25e884c64a48bc534167 |