Format numbers as multiples of Pi
Project description
Matplotlib Format Pi
Branches
Master
Version | Upload Status | Downloads |
---|---|---|
Release
Version | Upload Status | Size |
---|---|---|
Format multiples of pi as strings on Matplotlib axes.
The MultiplePi
class creates a Locator to place ticks at desired multiples and a Formatter to format all tick labels.
The base (π or τ) can be divided by any Natural Number.
Multiples of one-π or one-τ can be placed/formatted too. (2π, 3π, 2τ, 3τ, etc.)
Installing
pip install matplot-fmt-pi
Examples
from matplot_fmt_pi.ticker import MultiplePi
Simply, the instance can be asssigned a denominator of pi then passed to matplotlib.
The parameters can also be modified to adjust the output to something more sophisticated.
Running Examples
Clone, then from the repo,
cd examples/
python *.py
Put the repo's directory in the python path to import the matplot_fmt_pi
folder not the installed package.
PYTHONPATH=/home/user/py-pros/format-pi python examples/pi_graph.py
Todo
- Add testing option once installed (Like
numpy.test()
)
Meta
Inspired by this post on StackOverflow.
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
File details
Details for the file matplot-fmt-pi-2.0.0.tar.gz
.
File metadata
- Download URL: matplot-fmt-pi-2.0.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3000686063171a3fb7b8aaaf539e40ff7037cef1e244db6bad12e298d0c26259 |
|
MD5 | a0249b2b08fd8351976fc95609e707bc |
|
BLAKE2b-256 | 6f06b6a5222f5a56b2404fae48858008efef48d074c24c68fefc15b139220f5b |
File details
Details for the file matplot_fmt_pi-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: matplot_fmt_pi-2.0.0-py3-none-any.whl
- Upload date:
- Size: 6.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa9f9538e119e531330027cb3ba3bf5562f1fcc7d1b223e12d40acf5ba098b06 |
|
MD5 | 2d27a8e3764d6d898d9dbd3f641eb3ed |
|
BLAKE2b-256 | 419d4c122727bf60712a64717ef15fa1c3fda38727f53e623b3bacb62e235b77 |