Gnuplot:Same Loop for input and output file <p>I would like to do the following thing</p> <p>set output 'error0.tex'<br> plot 'error0.dat' using 1:2 title 'Error x', \<br> error0.dat' using 1:3 title 'Error y'<br> ...<br> ...<br> set output 'error10.tex'<br> plot 'error10.dat' using 1:2 title 'Error x', \<br> error10.dat' using 1:3 title 'Error y' </p> <p>Is there any simple way to get this?</p> <p>So i get 10 different files with 2 graphs in it.</p>