No description
Find a file
2021-03-02 04:07:16 +03:00
.github/workflows This is not a binary package 2021-02-28 17:15:49 +03:00
src Minor code improvements 2021-03-02 04:07:16 +03:00
tests add support for int graphs, dry, optimize a bit 2021-03-01 23:17:25 +03:00
asciigraph.nimble Update tests, make code support float32, prepare for updating the code. 2021-03-01 21:09:15 +03:00
LICENSE Initial commit 2018-10-12 08:19:27 -07:00
README.md add support for int graphs, dry, optimize a bit 2021-03-01 23:17:25 +03:00

asciigraph BuildAndTest

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! :octocat: