From kimash21 at gmail.com Mon Jul 16 00:20:31 2018 From: kimash21 at gmail.com (Kimani Kitson-Walters) Date: Sun, 15 Jul 2018 18:20:31 -0400 Subject: [adegenet-forum] Insert Legend when mapping PC of DAPC using colorplot() Message-ID: Hello Fellow adegenet users, I need your help :) I have run a DAPC on individuals from 5 sites and have mapped the results using the colorplot() function. The resulting map shows the average DAPC score for each site by converting the score for each site into a colour with sites with similar colours being more related and vice versa. How do I insert a legend to indicate what the relationship of the colours mean? I assume you can use the legend() function but how do I give it the average DAPC scores so it can translate it into a colour scale? I hope someone can help me. I would really appreciate it. Kimani Kitson-Walters Data Monitoring Officer Caribbean Netherlands Science Institue St. Eustatius -- Mr. Kimani Kitson-Walters BSc (Hons) PhD Candidate University of the West Indies, Mona -------------- next part -------------- An HTML attachment was scrubbed... URL: From thibautjombart at gmail.com Mon Jul 16 12:08:18 2018 From: thibautjombart at gmail.com (Thibaut Jombart) Date: Mon, 16 Jul 2018 11:08:18 +0100 Subject: [adegenet-forum] Insert Legend when mapping PC of DAPC using colorplot() In-Reply-To: References: Message-ID: Hi Kimani, this is a good question, but I'm afraid there's no good answer to it. How many dimensions did you map into colors? If more than one, say 2, then providing a legend is quite hard, as your legend itself should be 2-dimensional (run example(colorplot) for an example of 2d color map). For 3 dimensions, that's even worse. In short: for a one-dimensional color, that's pretty easy, and not really feasible beyond. For publication purposes, you could present the colorplot as a synthesis figure, and use individual maps for separate axes. Best Thibaut -- Dr Thibaut Jombart Lecturer, Department of Infectious Disease Epidemiology, Imperial College London Head of RECON: repidemicsconsortium.org WHO Consultant - outbreak analysis https://thibautjombart.netlify.com Twitter: @TeebzR +44(0)20 7594 3658 On 15 July 2018 at 23:20, Kimani Kitson-Walters wrote: > Hello Fellow adegenet users, > > I need your help :) > > I have run a DAPC on individuals from 5 sites and have mapped the results > using the colorplot() function. The resulting map shows the average DAPC > score for each site by converting the score for each site into a colour > with sites with similar colours being more related and vice versa. > > How do I insert a legend to indicate what the relationship of the colours > mean? I assume you can use the legend() function but how do I give it the > average DAPC scores so it can translate it into a colour scale? > > I hope someone can help me. I would really appreciate it. > > Kimani Kitson-Walters > Data Monitoring Officer > Caribbean Netherlands Science Institue > St. Eustatius > -- > > > Mr. Kimani Kitson-Walters BSc (Hons) > PhD Candidate > University of the West Indies, Mona > > _______________________________________________ > adegenet-forum mailing list > adegenet-forum at lists.r-forge.r-project.org > https://lists.r-forge.r-project.org/cgi-bin/mailman/ > listinfo/adegenet-forum > -------------- next part -------------- An HTML attachment was scrubbed... URL: