Create text-based graphs
Project description
tplot
tplot
is a Python package for creating text-based graphs. Useful for visualizing data to the terminal or log files.
Features
- Scatter plots, line plots, horizontal/vertical bar plots, and image plots
- Supports numerical and categorical data
- Legend
- Unicode characters (with automatic ascii fallback)
- Colors
- Few dependencies
- Fast and lightweight
- Doesn't take over your terminal (only prints strings)
Installation
tplot
is available on PyPi:
pip install tplot
Documentation
Documentation is available on readthedocs.
Examples
Basic usage
import tplot
fig = tplot.Figure()
fig.scatter([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10])
fig.show()
A more advanced example
import tplot
import numpy as np
x = np.linspace(start=0, stop=np.pi*3, num=80)
fig = tplot.Figure(
xlabel="Phase",
ylabel="Amplitude",
title="Trigonometric functions",
legendloc="bottomleft",
width=60,
height=15,
)
fig.line(x, y=np.sin(x), color="red", label="sin(x)")
fig.line(x, y=np.cos(x), color="blue", label="cos(x)")
fig.show()
See more examples in the documentation.
Contributing
Contributions are welcome. Bug fixes, feature suggestions, documentation improvements etc. can be contributed via issues and/or pull requests.
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
tplot-0.3.4.tar.gz
(268.6 kB
view details)
Built Distribution
tplot-0.3.4-py3-none-any.whl
(13.4 kB
view details)
File details
Details for the file tplot-0.3.4.tar.gz
.
File metadata
- Download URL: tplot-0.3.4.tar.gz
- Upload date:
- Size: 268.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1e9e84ca2a1c2ffde270f7ed95c4e70686a3d174580412657a48be3747a0442 |
|
MD5 | 6d7ff2f3e33c524bd2985022feb4610d |
|
BLAKE2b-256 | af430bb59c65cc54f9c8694e5a721e5bdda0ae16af1ada9572005b74ab7353b3 |
File details
Details for the file tplot-0.3.4-py3-none-any.whl
.
File metadata
- Download URL: tplot-0.3.4-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad6dacbecee56baa593e2652a8eab59842d2ef385f1d4af42b29716876044c30 |
|
MD5 | 2612c28c1092ec94b97bf12c7a078eb6 |
|
BLAKE2b-256 | 9fdcf10df801798848ba6af74205c12e532a2dbc0a18fade6f1a7784d8cf4f73 |