https://github.com/haccht/histogram
Render histograms in the terminalš
https://github.com/haccht/histogram
cli command-line terminal tool
Last synced: 5 months ago
JSON representation
Render histograms in the terminalš
- Host: GitHub
- URL: https://github.com/haccht/histogram
- Owner: haccht
- License: mit
- Created: 2023-11-03T06:32:41.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-11T00:04:12.000Z (almost 2 years ago)
- Last Synced: 2024-09-11T04:16:18.801Z (almost 2 years ago)
- Topics: cli, command-line, terminal, tool
- Language: Go
- Homepage:
- Size: 21.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# histogram
Render histograms in the terminal.
```
$ histogram -h
Usage:
histogram [OPTIONS]
Application Options:
-b, --bins= Number of bins in the histogram (default: 10)
--min= Minimum value in the histogram
--max= Maximum value in the histogram
Help Options:
-h, --help Show this help message
```
`histogram` render histograms from the given list of numbers.
```
$ head normaldistribution.txt
0.4
1.98
-0.01
1.46
0.5
0.72
-0.66
-0.29
1.75
-0.96
$ cat normaldistribution.txt | histogram
Total count = 1000
Min/Avg/Max = -3.25 / -0.01 / 3.23
[ -3.25, -2.60 ] 2
[ -2.60, -1.95 ] 19 |||
[ -1.95, -1.31 ] 77 ||||||||||||
[ -1.31, -0.66 ] 166 |||||||||||||||||||||||||||
[ -0.66, -0.01 ] 236 ||||||||||||||||||||||||||||||||||||||
[ -0.01, 0.64 ] 243 ||||||||||||||||||||||||||||||||||||||||
[ 0.64, 1.29 ] 160 ||||||||||||||||||||||||||
[ 1.29, 1.93 ] 75 ||||||||||||
[ 1.93, 2.58 ] 18 ||
[ 2.58, 3.23 ] 4
```