Crates.io | v_hist |
lib.rs | v_hist |
version | 0.1.3 |
source | src |
created_at | 2019-03-27 13:26:38.618851 |
updated_at | 2021-11-12 17:52:14.731184 |
description | A really quick way to make histograms that fix the terminal |
homepage | |
repository | https://github.com/jonaylor89/hist |
max_upload_size | |
id | 124157 |
size | 9,639 |
Terminal histograms
extern crate v_hist;
extern crate rand;
use rand::Rng;
fn main() {
let mut h = v_hist::init();
let mut rng = rand::thread_rng();
// h.max_width = 50;
for x in 0..200 {
h.add_entry(format!("{}", x), rng.gen_range(0, 3000)) ;
}
h.draw();
}
and Voila
Credit where credit is due: https://github.com/JustinMMiller/CUtils