Skip to content

averynortonsmith/spark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Sparkline ascii bar charts for Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages