Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dimchtz/rust-hist
A tiny library to print histograms in Rust.
https://github.com/dimchtz/rust-hist
hist histogram rust rust-hist rust-lang rust-library
Last synced: 28 days ago
JSON representation
A tiny library to print histograms in Rust.
- Host: GitHub
- URL: https://github.com/dimchtz/rust-hist
- Owner: DimChtz
- License: mit
- Created: 2017-11-06T14:50:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-11-06T15:07:54.000Z (about 7 years ago)
- Last Synced: 2024-09-17T15:49:34.038Z (4 months ago)
- Topics: hist, histogram, rust, rust-hist, rust-lang, rust-library
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rust-hist (hist) - v0.1.0
A tiny library to print histograms in Rust.# Examples
#### Print a histogram.
```rust
let mut h = hist::Hist::new(30, 5, &vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10], &vec![21, 10, 15, 17, 26, 8, 12, 2, 5, 7]);h.display();
```or just:
```rust
hist::Hist::new(30, 5, &vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10], &vec![21, 10, 15, 17, 26, 8, 12, 2, 5, 7]).display();
```##### Result
```bash
*
* * *
* * * * *
* * * * * * * *
* * * * * * * * *
*******************************
```# Installation
Add this line to your Cargo.toml:
```toml
[dependencies]
hist = "0.1.0"
```and then add this line to your main.rs:
```rust
extern crate hist;
```