#! /bin/bash 
# Last edited on 2017-02-05 08:33:12 by jstolfi

# Reads a file with {CAPACITY} {CURNUM} {NEWNUM} per line.
# Plots histogram with horizontal log scale

fname="$1"; shift

gnuplot << EOF
set term X11

set logscale x

set xrange [4:2500]
set yrange [0:10]

set xtics ( \
  6, \
  10, 15, 25, 40, 60, \
  100, 150, 250, 400, 600, \
  1000 )

set boxwidth 0.05

plot \
  "${fname}" using 1:3 with boxes lc rgb '#118800', \
  ""         using 1:2 with boxes lc rgb '#ff2200'

pause mouse any

EOF
