use more printf and less cat in gnuplot command generator