I have several data files produced from a Fortran code. All the data files are following the same style regarding their names, that is: data###.out, where ### starts from 001 and ends to 500. I know that in order to read and plot several data files in gnuplot I must use
plot for [i=1:500] sprintf('data00%i.out', i) u 1:2 w d lc rgb 'black'
However, this only works until data009.out. For 010 to 099 it should skip one zero and from 100 to 999 two zeros. How can I obtain this?
To pad with zeroes an integer printed with three digits, the correct format is
%03i. Try: