[adegenet-forum] colorplot and scatter
BICHET CORALINE
coraline.bichet at univ-lyon1.fr
Thu Aug 20 11:29:46 CEST 2015
Dear forum
I have two questions about the adegenet functions "colorplot" and "scatter"
I precise that I am a beginner with the package adegenet, so excuse me in advance if my questions seem a little stupid...
1. Colorplot
I made a colorplot to represent the result of a sPCA. The colorplot plots the different populations according to their localisation and the colors correspond to the global sPCA score. I would like to add a legend in a box representing the correspondance between colors and sPCA score (as the image below). I search... but I did not find anything to do this...
[cid:426d0c7f-6e00-4dd2-a001-eeab8f80089a]
2. Scatter
I used the function scatter to represent the results of a DAPC. The colored dots in the plot represent the cluster, but I would like to know if it is possible that the dots represent populations instead of clusters. The clusters would be still represented with the colored bars and the ellipses. I only want to change the dot colors. I tried to manually add dots in the plot (with the function "points"), using the coordinates of each indviduals in the DAPC axes. But the dots did not appeared... maybe due to a scale problem that I cannot solve...
Here the function that I use for one population. The data frame "ind" contains the DAPC LD1 and LD2, and the population names of the different individuals :
points(ind$LD1[ind$pop=="Aussois"]), scale(ind$LD2[ind$pop=="Aussois"]), col="black", pch=16, cex = 1)
I hope that my questions are comprehensible. Thank you very much in advance for your help. Don't hesitate to let me know if you need further information to more understand my problems.
Thanks a lot!
Coraline Bichet
coraline.bichet at univ-lyon1.fr
+33(0)472433584
UMR-CNRS 5558, Laboratoire de Biométrie et Biologie Evolutive (LBBE)
Université Claude Bernard Lyon 1, bâtiment Mendel
43 boulevard du 11 novembre 1918
69622 Villeurbanne Cedex, FRANCE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150820/5cc2db0c/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: box.jpg
Type: image/jpeg
Size: 5902 bytes
Desc: box.jpg
URL: <http://lists.r-forge.r-project.org/pipermail/adegenet-forum/attachments/20150820/5cc2db0c/attachment.jpg>
More information about the adegenet-forum
mailing list