#! /bin/bash
gnuplot -persist <<EOF
set data style linespoints
show timestamp
set title "$1 - $2"
set xlabel "time (seconds)"
set ylabel "Segments (cwnd, ssthresh)"
set terminal pdf
set output 'graph-$1.pdf'
plot "$1" using 1:7 title "snd_cwnd", \\
     "$1" using 1:(\$8>=2147483647 ? 0 : \$8) title "snd_ssthresh"
EOF
