Created
February 11, 2015 20:54
-
-
Save huned/25acca1dd567aed6f2c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Plot an ASCII histogram of numbers from stdin. Uses gnuplot. | |
# Optionally specify bin size as an argument. | |
if [ "$1" == '' ]; then | |
binsize=100 | |
else | |
binsize=$1 | |
fi | |
gnuplot -e "set term dumb; set key off; set yzeroaxis; plot '-' using (floor(\$1/$binsize)):(1) smooth frequency with boxes" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment