improved the Gnuplot script