It is similar to the following question:
How to set colours for groups of elements on a plot - New to Julia - Julia Programming Language
For example, I have two groups of data: one is labeled as “22” and one is labeled as “8”. Each group contains more than one data points. How do I make those data points which are in the same group to have the same color? I want to change the number of groups in the future, so I wish I can dynamically generate a series of colors and use them on my groups.
The relevant code is here.