<div dir="ltr">Hi Kimani, <div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>Best</div><div>Thibaut</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br>--<br>Dr Thibaut Jombart<br>Lecturer, Department of Infectious Disease Epidemiology, Imperial College London<br>Head of RECON: <a href="http://repidemicsconsortium.org" target="_blank">repidemicsconsortium.org</a><br>WHO Consultant - outbreak analysis</div><div><a href="https://thibautjombart.netlify.com" target="_blank">https://thibautjombart.netlify.com</a><br>Twitter: @TeebzR<br>+44(0)20 7594 3658</div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On 15 July 2018 at 23:20, Kimani Kitson-Walters <span dir="ltr"><<a href="mailto:kimash21@gmail.com" target="_blank">kimash21@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">Hello Fellow adegenet users,<div><br></div><div>I need your help :)</div><div><br></div><div>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.</div><div><br></div><div>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? </div><div><br></div><div>I hope someone can help me. I would really appreciate it.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Kimani Kitson-Walters</div><div>Data Monitoring Officer</div><div>Caribbean Netherlands Science Institue</div><div>St. Eustatius</div></font></span></div><span class="HOEnZb"><font color="#888888">-- <br><div dir="ltr" class="m_-7878868747999001270gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr"><br>
Mr. Kimani Kitson-Walters BSc (Hons)<br>
PhD Candidate<br>
University of the West Indies, Mona</p>
</div></div>
</font></span><br>______________________________<wbr>_________________<br>
adegenet-forum mailing list<br>
<a href="mailto:adegenet-forum@lists.r-forge.r-project.org">adegenet-forum@lists.r-forge.<wbr>r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/adegenet-forum" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/adegenet-forum</a><br></blockquote></div><br></div>