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.5.tar.gz
(269.3 kB
view details)
Built Distribution
tplot-0.3.5-py3-none-any.whl
(13.5 kB
view details)
File details
Details for the file tplot-0.3.5.tar.gz
.
File metadata
- Download URL: tplot-0.3.5.tar.gz
- Upload date:
- Size: 269.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4fcb8c1d1faa706dad471473bc2b95f57cc85ad5dc83702684e22e03ce31f4c |
|
MD5 | 8fb0ccd60be480ecf3d3d159033a1537 |
|
BLAKE2b-256 | d234be30b8a7f4a3ad6e385aa826842326563b9c733499101a48990806c6b4d0 |
File details
Details for the file tplot-0.3.5-py3-none-any.whl
.
File metadata
- Download URL: tplot-0.3.5-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a63dc0d6ee282e5fa8b0677abaa5d0cc6022b2de0a4680241e5a5724e8259d2 |
|
MD5 | 672a5f1884d4ebe7ab8540b9f73b2283 |
|
BLAKE2b-256 | b6006ae33d7098dc408f237fb8395d5424702c6ed738fb6c104cf51348f62d2a |