<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Verdana","sans-serif";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:3.0cm 2.0cm 3.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="2050" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Hi Jombart,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>I have a suggestion regarding s.value to plot the squares plot for sPCA. One issue is that if samples are very close geographically the squares overlap. White squares have black borders which is good, but the black squares have white edges which is confusing. It becomes difficult to say of samples are overlapping or its just the border around it. I dug into the function and found that it plots using symbols(). I don’t know whats the advantage of using symbols() over just points().<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>I have tried to change this to points() and this works a lot better. Sample script from the region.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>##<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>csize=1<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>sq1<-rescale(sq,c(csize,csize+3))<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>for (i in 1:(nrow(data.frame(dfxy)))) {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>            if (sign(z[i]) >= 0) {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>                #symbols(coo$x[i], coo$y[i], squares = sq[i], bg = "black", fg = "white", add = TRUE, inch = FALSE)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>                             points(coo$x[i], coo$y[i],col="red",cex=sq1[i],pch=15)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>            }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>            else {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>                #symbols(coo$x[i], coo$y[i], squares = sq[i], bg = "white", fg = "black", add = TRUE, inch = FALSE)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>                             points(coo$x[i], coo$y[i],col="blue",cex=sq1[i],pch=15)<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>            }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>        }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>##<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>Firstly it doesn’t have this background and foreground problem with symbols. Second, it can be any two user defined colours. Third it can be any pch, doesn’t have to be square. I could see from the function that you were planning to incorporate circles.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>##<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>else if (method == "circlesize") {<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>        print("not yet implemented")<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>    }<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>##<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'>On a different matter, what is d=2, that I see on the top right corner of s.class() PCA plots?<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Verdana","sans-serif"'><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Kind regards</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'> <o:p></o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=550 style='width:412.5pt'><tr><td width=300 valign=top style='width:225.0pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Roy Mathew Francis</span></b><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><br>Ph.D. Fellow</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></td><td width=250 valign=top style='width:187.5pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Dept. of Agroecology</span></b><b><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><br></span></b><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Aarhus University<br>Forsøgsvej 1<br>DK-4200 Slagelse</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif";display:none'><o:p> </o:p></span></p><table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 width=550 style='width:412.5pt'><tr><td width=300 valign=bottom style='width:225.0pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'>Tel.: +45 8715 8131<br>Email: </span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#003366'>RoyFrancis.Mathew@agrsci.dk</span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></td><td width=250 valign=bottom style='width:187.5pt;padding:0cm 0cm 0cm 0cm'><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:black'><br>Tel.: +45 8715 6000<br>Web: <a href="www.agrsci.au.dk" target="_new"><span style='color:#003366;text-decoration:none'>www.agrsci.au.dk</span></a></span><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p></o:p></span></p></td></tr></table><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><img border=0 width=550 height=97 id="_x0000_i1025" src="cid:image001.jpg@01CD22E1.99EAA490" alt=Logo></span><o:p></o:p></p></div></body></html>