https://github.com/xigh/go-hist
simple go program to draw histograms
https://github.com/xigh/go-hist
Last synced: 3 months ago
JSON representation
simple go program to draw histograms
- Host: GitHub
- URL: https://github.com/xigh/go-hist
- Owner: xigh
- License: mit
- Created: 2016-09-09T09:56:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-09T10:20:16.000Z (over 8 years ago)
- Last Synced: 2025-01-08T06:20:10.202Z (5 months ago)
- Language: Go
- Size: 37.1 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-hist
simple go program to draw histogramsInstallation
-----------go get github.com/xigh/go-hist
Documentation
-----------Usage:
./hist [options...]
-endian="little": endianess: [little, big]
-gather="max": data gathering: [max, avg]
-height=1000: image height
-hmargin=10: horizontal margin
-length=2147483647: max number of lines
-lspace=0: space between lines
-lwidth=1: line width
-out="out.png": output filename
-skip=0: number of entry to skip
-type="text": datatype: [i8, u8, i16, u16, i32, u32, f32, f64, text]
-vmargin=10: vertical margin
-width=0: force image width [overrides line width]Examples
-----------Files can be binary files, such as raw audio track:
./hist --type i16 --length 2000000 --width 3000 --out audio.png audio.raw
scanning input
c=2000000 min=-32768.000000 max=32767.000000 avg=0.233254 zero=32768.00, vpl=671.14 [3000x1000]
generating background
processing image
audio.png saved 9192709px
Files can also be floats in text format:
head data.txt
1.35
1.50
1.09
0.73
1.59
1.43
1.21
1.11
1.11
0.68
./hist data.txt
scanning input
c=1418 min=0.150000 max=33.670000 avg=4.360035 zero=0.00, vpl=1.00 [1438x1000]
generating background
processing image
out.png saved 179241px
Bugs
-----------Yes.