kressi / terminalplot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terminalplot

PyPi Version

Code Climate

Test Coverage

Terminalplot is a minimalistic packgage, that only prints points to the terminal. It does not have any dependencies.

Console plot

Installation

pip install terminalplot

Usage

Command Line

Get size of terminal emulator (tty):

$ plot -s
Rows: 25, Columns: 80

Plot some points:

$ plot -x '-1 0 1 2 3 4' -y '0.1 0.2 0.23 0.234 0.24'

API

Plotting a graph

from terminalplot import plot
x = range(100)
y = [i**2 for i in x]
plot(x, y)

Get size of current terminal window

from terminalplot import get_terminal_size
get_terminal_size()

About

License:GNU General Public License v3.0


Languages

Language:Python 94.9%Language:Shell 5.1%