Hi Laia,
Yes, it’s super important to stick with the same colours for each population across all the plots so the reader doesn’t get confused.
Here are a few colour-blind friendly options you might find handy:
library(dartRverse)
t1 <- bandicoot.gl
pcoa <- gl.pcoa(t1)
# Option 1: Adobe Color Wheel (great, but limited to 5 colours)
# https://color.adobe.com/create/color-accessibility
# Just click the middle of a colour to get the code
pop_colors <- c("#0A09EB", "#EAE5A6", "#42CAEA", "#DAEB09", "#6B3896")
gl.pcoa.plot(pcoa, x = t1, pt.colors = pop_colors)
# Option 2: Okabe-Ito palette (one of the best for accessibility!)
# Info: https://siegal.bio.nyu.edu/color-palette/
library(pals)
pop_colors <- okabe(n = nPop(t1))
gl.pcoa.plot(pcoa, x = t1, pt.colors = pop_colors)
# Option 3: RColorBrewer palettes
library(RColorBrewer)
display.brewer.all(colorblindFriendly = TRUE)
pop_colors <- brewer.pal(n = nPop(t1), name = "Dark2")
gl.pcoa.plot(pcoa, x = t1, pt.colors = pop_colors)
Cheers,
Luis
--
You received this message because you are subscribed to the Google Groups "dartR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dartr+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dartr/dd89baf9-a10d-4406-b4eb-fe2cd5bd45b6n%40googlegroups.com.