Skip to content

Latest commit

 

History

History
20 lines (13 loc) · 505 Bytes

README.md

File metadata and controls

20 lines (13 loc) · 505 Bytes

spark

Sparkline ascii bar charts for Python

Based on /~https://github.com/holman/spark/blob/master/spark

Adds support for multi-row charts. Unfortunately, doesn't support negative numbers, since box drawing characters don't have top-aligned blocks.

demo:

import spark

collatz = lambda n: [1] if n <= 1 else [n] + collatz(3 * n + 1 if n % 2 else n / 2)
print(spark.chart(collatz(871), height=20))

result:

demo.png