Termplots
A lightweight plot library for your terminal
Installation
pip install termplots
Get started
Simple plot
import termplots as tmp
tmp.plot([-0.5,0,1,0.5,1.5], ystep=0.5)
Output:
2.0|
1.5| *
1.0| *
0.5| *
0.0|--*-------
0.5|*
1.0|
Multiple plots
import termplots as tmp
tmp.plot([[1,0,2], [-1,0,3,0,2,2]], car=['*', '$', '@'], labels=['List 1', 'List 2'])
Output:
4|
3| $
2| * $ $
1|*
0|--@---$-----
1|$
2|
*: List 1
$: List 2
@: overlaps
Compact plot
import termplots as tmp
tmp.cplot([[32,20,0, 112],[-32,-20,0,20]])
Output:
112| *
32|*
20| * #
0|----@---
20| #
32|#
or
import termplots as tmp
tmp.cplot([-3,2,1,15])
Output:
15| *
2| *
1| *
0|--------
3|*
Other arguments
plot()
ystep(default1): defines steps on the y axislowlim: lower limit of the y axishighlim: upper limit of the y axiscar(default['*', '#', '@']): list of point(s) marker, the last char is used for overlapslabels(defaultNone): list of labels
cplot()
car(default['*', '#', '@']): list of point(s) marker, the last char is used for overlapslabels(defaultNone): list of labels
Colors
Termplots support up to 6 colors. Colors are automatically assigned to different series.
I tested the colors only on macOS. If the colors don't work try a different terminal or open an issue
Metadata
Release files for termplots 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| termplots-0.2.1.tar.gz | 3.5 kB | Without provenance | Details for termplots-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| termplots-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for termplots-0.2.1-py3-none-any.whl |
Total release size: 7.4 kB
Release files / termplots-0.2.1.tar.gz
| Download URL | termplots-0.2.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43b34ccad5d513ad25cac521e826fc7908fb0819e95b34fdb8be3b557e438598
|
|
BLAKE2b-256 checksum How to use checksums |
8ce6c41a9b522e17c1094e84d1ece58ab2068baee557332d7cf6377c707dc60d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Release files / termplots-0.2.1-py3-none-any.whl
| Download URL | termplots-0.2.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
181cc6bf42e749e4541a329f8c16b6602e476291895cef8877b018f6592716d7
|
|
BLAKE2b-256 checksum How to use checksums |
fd851e5b289ecc5d12790036941d2119abd2e202f02f975feb1f12a65d63bb25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.16
|
Security for termplots 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.