added gnuplot-compatible output file, changed iteration variable name from k to i