rasciigraph
Tiny Rust library to draw pretty line graphs using ascii characters.
Usage
Add this to your Cargo.toml
[]
= "0.2"
Add this line of code to top of your source code
extern crate rasciigraph;
If you prefer to use Rust 2018 edition you may prefer to add this line to your source code
use
Examples
This code
extern crate rasciigraph;
use ;
Produces an output like this
10.00 ┤ ╭╮
8.70 ┤ ╭╮ ││
7.40 ┼ ││ ╭╮ ││
6.10 ┤ ││ ││ ││
4.80 ┤ ││ ││ ││
3.50 ┤ ││ ││ ││
2.20 ┤ ││ ╭╮ ││ ╭╮ ││ ╭╮
0.90 ┤ ╭╮ ││ ╭╯╰╮ ╭╮ ││ ╭╯╰╮ ╭╮ ││ ╭╯╰╮
-0.40 ┼───╯╰──╯│╭─╯ ╰───────╯╰──╯│╭─╯ ╰───────╯╰──╯│╭─╯ ╰───
-1.70 ┤ ││ ││ ││
-3.00 ┤ ╰╯ ╰╯ ╰╯
I'm a doctor, not an engineer.
With 0.2.0 version you can also plot multi series
This is the output
7.00 ┤ ╭──╮
6.00 ┤ ╭───╯ ╰───╮
5.00 ┤ ╭──╯ ╰──╮
4.00 ┼─╯ ╭───╮ ╰─
3.00 ┤ ╭──╯ ╰──╮
2.00 ┼─╯ ╰──
1.00 ┤ ╭───╮
0.00 ┼─╯ ╰─
Acknowledgement
This crate is rustlang port of library asciigraph written by @guptarohit.
Above library is also port of library asciichart written by @kroitor.