[MRG+1] Improved plot digits classification example.

Made two for loop statements more readable by introducing local variables.