histpdf (374B)
1 #!/bin/sh 2 f="$(mktemp)" 3 cat > "$f" 4 gnuplot -e "set term unknown;\ 5 plot '${f}' using 0:1;\ 6 set term pdf;\ 7 nbins=10;\ 8 binwidth=(GPVAL_DATA_Y_MAX - GPVAL_DATA_Y_MIN) / nbins;\ 9 bin(x,width)=width * floor(x / width);\ 10 plot '${f}' using (bin(\$1, binwidth)):(1.0) smooth freq with boxes title ''" 11 rm -f "$f"