v_hist

Crates.iov_hist
lib.rsv_hist
version0.1.3
sourcesrc
created_at2019-03-27 13:26:38.618851
updated_at2021-11-12 17:52:14.731184
descriptionA really quick way to make histograms that fix the terminal
homepage
repositoryhttps://github.com/jonaylor89/hist
max_upload_size
id124157
size9,639
Johannes Naylor (jonaylor89)

documentation

README

hist

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

screenshot


Credit where credit is due: https://github.com/JustinMMiller/CUtils

Commit count: 23

cargo fmt