[adegenet-forum] Regarding s.value improvement and PCA whats d=n
Roy Francis Mathew
RoyFrancis.Mathew at agrsci.dk
Wed Apr 25 12:55:05 CEST 2012
Hi Jombart,
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().
I have tried to change this to points() and this works a lot better. Sample script from the region.
##
csize=1
sq1<-rescale(sq,c(csize,csize+3))
for (i in 1:(nrow(data.frame(dfxy)))) {
if (sign(z[i]) >= 0) {
#symbols(coo$x[i], coo$y[i], squares = sq[i], bg = "black", fg = "white", add = TRUE, inch = FALSE)
points(coo$x[i], coo$y[i],col="red",cex=sq1[i],pch=15)
}
else {
#symbols(coo$x[i], coo$y[i], squares = sq[i], bg = "white", fg = "black", add = TRUE, inch = FALSE)
points(coo$x[i], coo$y[i],col="blue",cex=sq1[i],pch=15)
}
}
##
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.
##
else if (method == "circlesize") {
print("not yet implemented")
}
##
On a different matter, what is d=2, that I see on the top right corner of s.class() PCA plots?
Kind regards
Roy Mathew Francis
Ph.D. Fellow
Dept. of Agroecology
Aarhus University
Forsøgsvej 1
DK-4200 Slagelse
Tel.: +45 8715 8131
Email: RoyFrancis.Mathew at agrsci.dk
Tel.: +45 8715 6000
Web: www.agrsci.au.dk
[cid:image001.jpg at 01CD22E1.99EAA490]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120425/a6923d5c/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.jpg
Type: image/jpeg
Size: 9975 bytes
Desc: image001.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120425/a6923d5c/attachment-0001.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.jpeg
Type: image/jpeg
Size: 76803 bytes
Desc: image.jpeg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20120425/a6923d5c/attachment-0001.jpeg>
More information about the adegenet-forum
mailing list