Skip to main content

Create text-based graphs

Project description

tplot

Documentation status

Supported Python versions

tplot is a Python module 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 if unicode is not supported)
  • Colors (using ANSI escape characters, with Windows support)
  • Few dependencies
  • Fast and lightweight

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

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

Uploaded Source

Built Distribution

tplot-0.3.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tplot-0.3.0.tar.gz
Algorithm Hash digest
SHA256 0e58f4a480f4f975802d4ce293d746b96813ab32b8be9d6649858d450575a707
MD5 7ecbad96ede27bb0d61e8c4e161dbc9d
BLAKE2b-256 338152fb01f9251d536bfeb428e60fab21eb2f874d24d4823d91364b117b1d79

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tplot-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d92a6fb2a99f61c74ba9db2b93e8924c451d0d950f4ada3c3a9fa347da938050
MD5 e29b7dd9be86a601f355c965caeb2220
BLAKE2b-256 aed9387ff61dadbfcbdf6585b6cdb368dd30ef8c588caae21d68dec340e2b86e

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