<html><body><div style="font-family: trebuchet ms,sans-serif; font-size: 12pt; color: #000000"><div>Map `grp` argument to your desired grouping. Make sure that you pass `col` the correct number of colors which should match the number of groups you are specifying.<br></div><div>By default, coloring is done on grouping (<a href="https://github.com/thibautjombart/adegenet/blob/master/R/dapc.R#L498" data-mce-href="https://github.com/thibautjombart/adegenet/blob/master/R/dapc.R#L498">see here</a>). See this example:</div><div><br data-mce-bogus="1"></div><div>library(adegenet)<br><br>data(H3N2)<br>pop(H3N2) <- factor(H3N2$other$epid)<br>dapc1 <- dapc(H3N2, var.contrib=FALSE, scale=FALSE, n.pca=150, n.da=5)<br><br>data.frame(dapc1$grp, pop(H3N2)) # they are matching<br></div><div><br data-mce-bogus="1"></div><div>Cheers,</div><div>Roman</div><div><br data-mce-bogus="1"></div><div><br data-mce-bogus="1"></div><div><br></div><div data-marker="__SIG_PRE__">----<br>In god we trust, all others bring data.<br>> Zahtevaj IJZ na https://kurc.biolitika.si</div><br><hr id="zwchr" data-marker="__DIVIDER__"><div data-marker="__HEADERS__"><b>From: </b>"Lucas Veiga" <lucasfip@yahoo.com.br><br><b>To: </b>adegenet-forum@lists.r-forge.r-project.org<br><b>Sent: </b>Thursday, October 12, 2017 1:34:19 AM<br><b>Subject: </b>[adegenet-forum] Dots in the DAPC graphic<br></div><br><div data-marker="__QUOTED_TEXT__"><div style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;" data-mce-style="color: #000; background-color: #fff; font-family: times new roman, new york, times, serif; font-size: 13px;"><div id="yui_3_16_0_ym19_1_1507751279292_16011">Dear all,</div><div id="yui_3_16_0_ym19_1_1507751279292_16011" dir="ltr">I would like to know what I can do for the dots in DAPC graph to be colored according to the populations and not according to the DAPC analysis groups?<br><br>Best regards,<br>Lucas Veiga Ayres Pimenta</div></div><br>_______________________________________________<br>adegenet-forum mailing list<br>adegenet-forum@lists.r-forge.r-project.org<br>https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum<br></div></div></body></html>