<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>It would seem it is currently impossible to color points individually. To do that, you'll have to either make a new version of the plot or draw the figure anew.<br></div><div><br></div><div><a target="_blank" href="https://github.com/thibautjombart/adegenet/blob/e7e57ac38132e3104035c386310d7b571e1d2c42/R/dapc.R#L584">https://github.com/thibautjombart/adegenet/blob/e7e57ac38132e3104035c386310d7b571e1d2c42/R/dapc.R#L584</a><br></div><div><br></div><div>Cheers,<br></div><div>Roman</div><br><div data-zbluepencil-ignore="true" id="Zm-_Id_-Sgn"><div><br></div><div><div>--- <br></div><div>“If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale<br></div></div><div><br></div></div><br><div style="" data-zbluepencil-ignore="true" class="zmail_extra"><br><div id="Zm-_Id_-Sgn1">---- On Sat, 12 Sep 2020 08:57:58 +0200 <b>Roman Luštrik <roman.lustrik@biolitika.si></b> wrote ----<br></div><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); padding-left: 6px; margin: 0px 0px 0px 5px;"><div class=" zm_-998960641125712720_parse_1059784732227076429"><div style="font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 10.0pt;"><div>By now you probably know the membership of each individual. Just assign them colors and pass that to the `col` parameter.<br></div><div><br></div><div>library(adegenet)<br></div><div><br></div><div>data(H3N2)<br></div><div>dapc1 <- dapc(H3N2, pop=H3N2$other$epid, n.pca=30,n.da=6)<br></div><div><br></div><div>custom.cols <- sample(c("red", "black"),<br></div><div> size = nInd(H3N2),<br></div><div> prob = c(0.2, 0.8),<br></div><div> replace = TRUE)<br></div><div><br></div><div>scatter(dapc1, col = custom.cols)<br></div><div><br></div><div>Cheers,<br></div><div>Roman<br></div><br><div><div><br></div><div><div>--- <br></div><div>“If we have data, let’s look at data. If all we have are opinions, let’s go with mine.” -- Jim Barksdale<br></div></div><div><br></div></div><br><div class="x_-61119788zmail_extra"><br><div>---- On Sat, 12 Sep 2020 08:17:54 +0200 <b>Das, Roma (ICRISAT-IN) <<a href="mailto:r.das@cgiar.org" target="_blank">r.das@cgiar.org</a>></b> wrote ----<br></div><br><blockquote style="border-left: 1.0px solid rgb(204,204,204);padding-left: 6.0px;margin: 0.0px 0.0px 0.0px 5.0px;"><style><br></style><div class=" zm_2098628863757334325_parse_-7409743074185134240"><div class="x_-1266410507WordSection1"><p style="margin: 0.0px;" class="">Hello,<br></p><p style="margin: 0.0px;" class="">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.<br></p><p style="margin: 0.0px;" class=""> <br></p><p style="margin: 0.0px;" class="">Thanks in advance.<br></p><p style="margin: 0.0px;" class=""> <br></p><p style="margin: 0.0px;" class="">Regards,<br></p><p style="margin: 0.0px;" class="">Roma<br></p></div></div>_______________________________________________<br>adegenet-forum mailing list<br><a href="mailto:adegenet-forum@lists.r-forge.r-project.org" target="_blank">adegenet-forum@lists.r-forge.r-project.org</a><br><a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum</a></blockquote></div><div><br></div></div><br></div></blockquote></div><div><br></div></div><br></body></html>