asciigraph
Console ascii line graphs in pure Nim â•â”ˆâ•¯.
Installation
nimble install asciigraph
Usage
Basic graph
import asciigraph
var data = @[3, 4, 9, 6, 2, 4, 5, 8, 5, 10, 2, 7, 2, 5, 6]
echo plot(data, caption="An example graph!")
Running this example renders the following graph:
10.00 ┤ â•â•®
9.00 ┤ â•â•® ││
8.00 ┤ ││ â•â•®â”‚│
7.00 ┤ ││ ││││â•â•®
6.00 ┤ │╰╮ ││││││ â•
5.00 ┤ │ │ â•â•¯â•°â•¯â”‚││â•â•¯
4.00 ┤â•â•¯ │â•â•¯ ││││
3.00 ┼╯ ││ ││││
2.00 ┤ ╰╯ ╰╯╰╯
An example graph!
Acknowledgements
This package is a Nim port of the asciichart library written by @kroitor.
Forked from https://github.com/KeepCoolWithCoolidge/asciigraph to update for latest Nim versions (and some other improvements).
Contributing
Feel free to make a pull request!