Skip to main content

Create text-based graphs

Project description

tplot

Documentation status Tests status codecov

Supported Python versions PyPI version License

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()

Basic example

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()

Advanced example

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


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.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

tplot-0.3.2-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file tplot-0.3.2.tar.gz.

File metadata

  • Download URL: tplot-0.3.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.4.0-96-generic

File hashes

Hashes for tplot-0.3.2.tar.gz
Algorithm Hash digest
SHA256 dab6eab07321b1a62fa6fbb73fdcde1f01e7570dfaf5bd78d4abc55d9b9b8b3f
MD5 08522d08171450c1d49d611d1be2417e
BLAKE2b-256 31f2fa3be777aedae07e63491f8b2e3ce8c85478fd3a99502f7e1cb5b36cfba4

See more details on using hashes here.

File details

Details for the file tplot-0.3.2-py3-none-any.whl.

File metadata

  • Download URL: tplot-0.3.2-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.12 CPython/3.8.10 Linux/5.4.0-96-generic

File hashes

Hashes for tplot-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 07c9004dda46de1e699ea8c4ad6be6a777aff231fe9bac52b5d95168549a4d52
MD5 e124e1f62c7d333a2687a839052c7edc
BLAKE2b-256 87076cb9bd2271ce4b9a597eb8b3afdfd37dcb62787637ceef19897d07d5bf0d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page