I'm looking to create a function or a macro that takes as an input a number n between 0 and 5 and returns five circles with the n leftmost circles filled, something like this:

circles, some filled

I'm still reading documentation, but I've never made a macro or a function like this before, so I cannot show a MWE. Any help will be appreciated.

Thank you very much in advance!


Here you go, basically the same macro you'll find here, but modified a bit to look like the picture you posted (No underline dots included).

To use it just put \dotexp{<n>} wherever you need.

enter image description here


\tikz{\foreach \x in {1,...,5}{\draw[rpgblue,fill=rpgblue] ({\x/2.5+0.01},0) circle (.58ex);
      \draw[\DEfill,fill=\DEfill] (\x/2.5,0) circle (.5ex);}}%


 \advance \x by 1

Not the answer you're looking for? Browse other questions tagged or ask your own question.