for [intvar = start:end{:increment}] for [stringvar in "A B C D"] for [element in Array]
例:
plot for [filename in "A.dat B.dat C.dat"] filename using 1:2 with lines plot for [basename in "A B C"] basename.".dat" using 1:2 with lines set for [i = 1:10] style line i lc rgb "blue" unset for [tag = 100:200] label tag Array animals = ["dog", "cat", "mouse", "llama"] do for [creature in animals] { INFILE = creature.".dat" OUTFILE = creature.".pdf" plot INFILE with boxes title creature }
繰り返しの入れ子もサポートしています:
set for [i=1:9] for [j=1:9] label i*10+j sprintf("%d",i*10+j) at i,j
さらなる説明については、以下参照: iteration (20), do (86)。
竹野茂治@新潟工科大学