Generate simple visualizations on terminal.
graphby can now be used on your Python projects through PyPi by running pip command on a Python-ready environment.
pip import --upgrade graphby
1. Import package
from graphby import Bar
2. Basic usage
from graphby import Bar
labels = ["a", "b", "c", "d"]
values = [1, 2, 3, 4]
Bar(labels, values).plot()
---
a: ** 1
b: ***** 2
c: ******** 3
d: ********** 4
3. Negative numbers
from graphby import Bar
labels = ["a", "b", "c", "d"]
values = [200, -350, 20, 999]
Bar(labels, values).plot()
---
a: **** 200
b: -350
c: *** 20
d: ********** 999
4. Custom symbol
from graphby import Bar
labels = ["a", "b", "c", "d"]
values = [200, -350, 20, 999]
Bar(labels, values, bar="+").plot()
---
a: ++++ 200
b: -350
c: +++ 20
d: ++++++++++ 999
5. Expand graph
from graphby import Bar
labels = ["a", "b", "c", "d"]
values = [200, -350, 20, 999]
Bar(labels, values, limit=15).plot()
---
a: ****** 200
b: -350
c: **** 20
d: *************** 999
6. Customizations
from graphby import Bar
labels = ["a", "b", "c", "d"]
values = [200, -350, 20, 999]
Bar(labels, values, bar="#", limit=5).plot()
---
a: ## 200
b: -350
c: # 20
d: ##### 999