<div dir="ltr"><div><div><div>Hi Pablo,<br><br></div>well, I tried but it does pretty much the same thing (i.e. 1 color per pop and no info on the moprhology, for the latter a file with morphology info is needed). Also I get this error message:<br><br>> myCol <- c("darkblue","darkgreen","red")<br>> scatter(dapc1, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, cstar=1, clab=1, col=myCol)<br>> par(xpd=TRUE)<br>> points(dapc$ind.coord[1:90,],<br>+        pch=17, cex=1, col="black")<br><b>Error in dapc$ind.coord : object of type 'closure' is not subsettable</b><br>> par(xpd=TRUE)<br>> points(dapc$ind.coord[91:218,],<br>+        pch=18, cex=1.4, col="black")<br><b>Error in dapc$ind.coord : object of type 'closure' is not subsettable</b><br>> par(xpd=TRUE)<br>> points(dapc$ind.coord[219:326,],<br>+        pch=21, cex=1, col="black")<br><b>Error in dapc$ind.coord : object of type 'closure' is not subsettable</b><br>> par(xpd=TRUE)<br>> points(dapc$ind.coord[327:392,],<br>+        pch=20, cex=1.3, col="black")<br><b>Error in dapc$ind.coord : object of type 'closure' is not subsettable</b><br><br></div>Cheers<br></div>Nic<br></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 April 2015 at 13:03, pablo fresia <span dir="ltr"><<a href="mailto:pfresia@gmail.com" target="_blank">pfresia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Nicolas,<br><br>what's going on, if you try something like this below ?<br><div><br>myCol <- c("darkblue","darkgreen","red")<br>scatter(dapc, scree.da=FALSE, bg="white", pch=20, solid=.4, cex=0, cstar=1, clab=1, col=myCol)<br>par(xpd=TRUE)<br>points(dapc$ind.coord[1:90,], <br>       pch=17, cex=1, col="black")<br>par(xpd=TRUE)<br>points(dapc$ind.coord[91:218,], <br>       pch=18, cex=1.4, col="black")<br>par(xpd=TRUE)<br>points(dapc$ind.coord[219:326,], <br>       pch=21, cex=1, col="black")<br>par(xpd=TRUE)<br>points(dapc$ind.coord[327:392,], <br>       pch=20, cex=1.3, col="black")<br><br></div><div>good luck!<br></div><div>pablo<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On 29 April 2015 at 21:50, Nicolas Dussex <span dir="ltr"><<a href="mailto:nicolas.dussex@gmail.com" target="_blank">nicolas.dussex@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I am doing a DAPC for a dataset that contains 6 populations. Among all my samples, there are three different morphs and each population contains a variable mixture of each. What I want to do is to use a different color for each population (I managed to do it) and use a different type of point for each sample according to its moprhotype. I have a file that contains this info ( 1 colomn with either X, W or WR). <br><br></div>I tried using pch as described below, but the labels do not correspond to the individuals. <br><br>dapc1 <- dapc(Z1, n.pca = 10, n.da = 3)<br>c<-morph_data_6m[,1]<br>scatter(dapc1, cstar=0,cex=2.5, cell=0, label=NULL, leg = TRUE,scree.da=FALSE,txt.leg = c("233","287","418","674","878","957","1085"), <b>pch=c</b>)<br><br></div>Would there be a way to assign to each individual a type of point corresponding to its morphotype? Say point for W, star for X and triangle for WR.<br><br></div>Thanks for your help!<br></div>Nic<span><font color="#888888"><br><div><div><div><br><br><div><div><div>-- <br><div><div dir="ltr"><div><div dir="ltr">Nic Dussex PhD<br>Department of Zoology<br>University of Otago<br>340 Great King Street<br>P.O.Box 56<br>Dunedin 9054<br>New Zealand<br><br>Mobile: +64 21 02790938<br></div></div></div></div>
</div></div></div></div></div></div></font></span></div>
<br></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><br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Nic Dussex PhD<br>Department of Zoology<br>University of Otago<br>340 Great King Street<br>P.O.Box 56<br>Dunedin 9054<br>New Zealand<br><br>Mobile: +64 21 02790938<br></div></div></div></div>
</div>