[adegenet-forum] Change color in scatter.dapc()
Roman Luštrik
roman.lustrik at biolitika.si
Sat Sep 12 08:57:58 CEST 2020
By now you probably know the membership of each individual. Just assign them colors and pass that to the `col` parameter.
library(adegenet)
data(H3N2)
dapc1 <- dapc(H3N2, pop=H3N2$other$epid, n.pca=30,n.da=6)
custom.cols <- sample(c("red", "black"),
size = nInd(H3N2),
prob = c(0.2, 0.8),
replace = TRUE)
scatter(dapc1, col = custom.cols)
Cheers,
Roman
---
“If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale
---- On Sat, 12 Sep 2020 08:17:54 +0200 Das, Roma (ICRISAT-IN) <r.das at cgiar.org> wrote ----
Hello,
I have a scatter plot with 20 groups (using on find.cluster() using 1200 individuals). However I want to use only two color for individuals in same scatter plot with 20 groups.
Thanks in advance.
Regards,
Roma
_______________________________________________
adegenet-forum mailing list
adegenet-forum at lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20200912/4090c58b/attachment.html>
More information about the adegenet-forum
mailing list