# a column of empty and filled circles

I wish to show 20 circles in a vertical rectangular whose m circles are filled. n circles for example colored by green and m-n colored by red. The radius of circles are the same and can be r. The circles are not filled are empty. How do I reach this aim? I wish to specify the position of green circles and red circles manually. For example: the first be green, the second be red, the third be green and the fourth, the remainder be empty. AND NOT Random.

• You can do that with a combination of Disk and Graphics. – anderstood Feb 19 '18 at 16:43

Here's another way:

colors = {Green, Red, Green, Sequence @@ ConstantArray[White, 17]};
r =
Table[Rectangle[{m, n}, RoundingRadius -> .5], {m, 1}, {n, 20}];

Graphics[{EdgeForm[Blue], Riffle[Reverse@colors, Flatten@r]},
Frame -> True, FrameStyle -> Directive[Blue, Bold],
FrameTicks -> None]


• You just need to specify your desired order in colors. I was doing something similar with Rectangles, so that's why I use them here instead of explicit circles (RoundingRadius->0.5 of a Rectangle[] equals a circle). – TumbiSapichu Feb 19 '18 at 23:21
• Thank you so much, your approach is very near to what I was searching, – Unbelievable Feb 20 '18 at 5:45
• @Irreversible, glad I could help! – TumbiSapichu Feb 20 '18 at 7:29

Here's one way:

GraphicsColumn[Table[Graphics[{RandomChoice[{Green, Red, White}],
Disk[{i, 0}, 0.4], Black, Circle[{i, 0}, 0.4]}], {i, 20}]]


• Thank you so much. But I wish to specify the position of green circles and red circles manually. For example: the first be green, the second be red, the third be green and the fourth, the remainder be empty. AND NOT Random. – Unbelievable Feb 19 '18 at 19:37
• @Irreversible What have you tried and where did you get stuck? This answer shows the basics. You can just as easily pull the colour from another list indexed by i. – Szabolcs Feb 19 '18 at 20:34
• @Szabolcs, I have exploited GraphicsColumn[{Graphics[Disk[]], Graphics[Disk[]], Graphics[Disk[]]}, (which is in the help Mathematica) Frame -> All], But unfortunately I had to create twenty copies of the line for specifying the position of colored circles. – Unbelievable Feb 20 '18 at 5:44