A library for graphing charts using ascii characters.
Project description
Ascii Etch
![Coverage Status](https://pypi-camo.freetls.fastly.net/85320747f7d17c2e1eaf784aff39fe25a9a86d14/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c696e6b6564696e2f6173636969657463682f62616467652e737667)
A graphing library with the goal of making it simple to graph series of numbers using ascii characters.
Quick Start
To start using Ascii Etch ensure Python 3.6 or higher is installed. Then install asciietch using pip3.6 or higher:
pip3.6 install asciietch
Then import asciietch and begin using it.
Examples
Graphing 0-4 values
>>> from asciietch.graph import Grapher
>>> g = Grapher()
>>> values = [0, 1, 2, 3, 4]
>>> print(g.asciigraph(values))
-
/
/
/
/
Graphing more values
>>> from asciietch.graph import Grapher
>>> g = Grapher()
>>> values = [0, 1, 2, 3, 4, 4, 3, 2, 1, 2, 2, 2]
>>> print(g.asciigraph(values))
--
/ \
/ \ ---
/ -
/
Graphing a large set of values and adding labels
>>> import random
>>> from asciietch.graph import Grapher
>>> g = Grapher()
>>> values = []
>>> v = 0
>>> for i in range(1000):
... v = v + random.randint(-1, 1)
... values.append(v)
>>> print(g.asciigraph(values, max_height=10, max_width=100, label=True))
Upper value: 147.6 *********************************************************************************
-------- ---
----/ - \- -
----/ \----/ \--
-/ \
---- ----/ \------ - ----
\------/ \----/ \/ \-
\--
\-------
\------
\- -
\-/
Lower value: 85.3 ********************************************* Mean: 122.196 *** Std Dev: 16.20 ***
Developing
git clone git@github.com:linkedin/asciietch.git
cd asciietch
python3 setup.py venv
source activate
python3 setup.py develop
Testing
pip3.6 install tox
tox
Contributing Code
Contributions are welcome, see Contribution guidelines for this project
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
asciietch-1.0.5.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for asciietch-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6865980798f21bca24e1630fe008d49dbd94abd9452f2e1b61596dbe5c1e997 |
|
MD5 | a2ec424a3461a56579e4902fea1182e5 |
|
BLAKE2b-256 | 460ea6fc231ca7e7c47a3189b02ab7a2d2613d06463e60006e34a4f2281af8fa |