Registry / data / termplotlib

termplotlib

JSON →
library0.3.9pypypi✓ verified 89d ago

Library for plotting in the terminal using Unicode characters. Current version 0.3.9, released irregularly. Supports line plots, horizontal and vertical bar charts. Requires Python >=3.7.

pip install termplotlib
INSTALL
IMPORT
SIG · TERMPLOTLIB
T
termplotlib
datapythonv0.3.9
Install
3.8s avg
Import
276ms
Disk
89MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v0.3.9 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.258s · 89.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.8s · import 0.294s · 86MB
89MB installed
● package 89MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

register_brille
✓ import termplotlib
✗ from termplotlib import tpl
Common mistake: the library does not export a 'tpl' alias.

Basic line plot using numpy arrays.

import termplotlib as tpl import numpy as np x = np.linspace(0, 2*np.pi, 20) y = np.sin(x) fig = tpl.figure() fig.plot(x, y, label='sine') fig.show()
Debug
Known issues
gotchaThe library does not support interactive plots or windowed output. It only prints to terminal.
fix
Use print(fig.get_string()) or fig.show() to render to stdout.
affects: all
gotchaData must be provided as lists or numpy arrays. Other iterables may not work correctly.
fix
Convert to list or numpy array before plotting.
affects: all
gotchaBar charts require exactly two arrays of equal length for horizontal bars.
fix
Check that your input arrays have the same size.
affects: all
Errors
Common errors & fixes
AttributeError: module 'termplotlib' has no attribute 'tpl'
Importing alias 'tpl' as a submodule instead of using import termplotlib as tpl.
fix
Use 'import termplotlib as tpl' then 'tpl.figure()'.
ValueError: x and y must have same first dimension
Input arrays for line or bar plots have different lengths.
fix
Ensure x and y (or left and right for barh) have the same length.
Upgrade
Version history
0.3.9latest on PyPI · released Sep 23, 2021
Audit
Dependencies

No dependency data recorded yet.

Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
termplotlib — pip install termplotlib · libregistry