A tool to draw ascii line chart in terminal
Project description
TermChart
Draw ascii line charts in terminal.
Install
pip3 install termchart
USage
Create a Python file :
import termchart
graph = termchart.Graph([1,2,3,2,5,1,-1,-5,-3])
graph.draw()
You can change the plot (default is +
):
graph.setDot('|')
Change the width and height (default cols is 160x50)
graph.setCols(200)
graph.setRows(40)
Add values whenever you need it with addData(<Float>)
. Here is a full example for a live graph with random values :
import termchart
import time
import os
from random import randint
graph = termchart.Graph([])
while True:
rand = randint(0, 9)
graph.addData(rand)
graph.draw()
time.sleep(1)
os.system('cls' if os.name == 'nt' else 'clear')
Donate
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
termchart-0.0.4.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for termchart-0.0.4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 858b948feee7c21f9dda2c63fd820bd55a4d08d34bf45ba2a0f5b99efc873b18 |
|
MD5 | 74d78732c71a49269f6ac33c04b25fd8 |
|
BLAKE2b-256 | 84daf92eeb6629af47fc9f322b1585f02e6e63c880c80459e0df1fd89f2f1e88 |