I am using the function seqiplot to create a sequence index plot. The problem is that I get some inconsistencies between what is shown on the plot and my sequence data. For example, I have the same sequence state in period t and t+1; however, the sequence index plot shows different colours for each period. Should not they have the same colour?
I suspect that it has to do with the number of posible states in my data set. There are 60 different states. So when I try to set the colour scheme I get this message: In brewer.pal(60, "Accent") : n too large, allowed maximum for palette Accent is 8 Returning the palette you asked for with that many colors
which indicates that Accent has a maximum of 8 colours (isn't it?).
Has anyone had a similar problem? How can I fix it?
Regards,
Francisco.
The default color palette used by
TraMineR
can get a maximum of 12 different colors, which is clearly insufficient in your case. Hence, you have to specify the color palette using thecpal
argument inseqdef
. Thecolorspace
package provides functions to get more than 12 colors.To choose your 60 colors using a graphical interface:
Or to automatically get a list of colors, try
See
?diverge_hcl
for more options.Hope this helps.