The answer by @corey979 is very good. Here I do basically the same, but with the following difference - Used limited scope (Avoid global variables) - Use [`Hue`][1] as a programmatically way to define the colours. - Use [`StringTemplate`][2] instead of [`StringJoin`][3] Here is my take Multicolumn[ Module[ { niterations = 9, data = RandomPoint[Disk[], 1000] }, Table[ ListLogLogPlot[ data , PlotStyle -> Hue[0.8 Rescale[k, {1, niterations}]] , PlotLegends -> {StringTemplate["Code ``"][k]} , PlotRange -> {{10^-3, 10}, {10^-3, 10}} ] , {k, niterations} ]]] ![Mathematica graphics](https://i.sstatic.net/eeLkF.png) [1]: http://reference.wolfram.com/language/ref/Hue.html [2]: http://reference.wolfram.com/language/ref/StringTemplate.html [3]: http://reference.wolfram.com/language/ref/StringJoin.html