Improved gnuplot script