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] and [`Rescale`][2] to define the colours programmatically. - Use [`StringTemplate`][3] instead of [`StringJoin`][4] Here is my take Multicolumn[ Module[ { niterations = 9, data = RandomPoint[Disk[{1,1}], 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/oHhZ1.png) [1]: https://reference.wolfram.com/language/ref/Hue.html [2]: https://reference.wolfram.com/language/ref/Rescale.html [3]: https://reference.wolfram.com/language/ref/StringTemplate.html [4]: https://reference.wolfram.com/language/ref/StringJoin.html