#! /bin/bash # PATH="/bin:/usr/bin"; export PATH title="$1" xlabel="iteration" ylabel="probability of correct solution" labels="set title \"$title\"\nset xlabel \"$xlabel\"\nset ylabel \"$ylabel\"" tail -n +2 | (printf "set term gif\nset output\n$labels\nset yrange [0:1]\nplot '-' notitle with linespoints lc rgb 'red'\n"; cat) | gnuplot