View source: R/DAPC_adegenet.R
goodcolors | R Documentation |
Return a good set of colors to use for clusters in admixture plots.
Generate an optimal set of colors for an admixture plot and particular K (number of clusters), while considering colorblindness.
goodcolors(n, thresh = 65, iter = 50, cbspace = c("prot", "deut", "trit"))
n |
Number of colors to include in the output set. |
thresh |
Minimum color distance between any pair of colors in the output set. This will be ignored if not met after 'iter' attempts. Default is 65. Values lower than this tend to result in some colors being too similar to easily distinguish. It will be difficult to find sets with more than 10 colors sets larger than 10 colors (with cbspace=NULL) if thresh is >80. |
iter |
Number of times to try to find a set of colors that meet 'thresh'. |
cbspace |
Character vector indicating which colorblind-transformed sets of colors should also meet thresh. Default is "prot","deut","trit", but it becomes difficult to find a passing color set when n > 4 using the defaults. |
Character vector of hex color codes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.