CreatePalette | R Documentation |
This function creates a list of color palettes for the plot and barplot functions
CreatePalette(color.vector = c("tomato", "chartreuse", "gold", "blue",
"violet", "wheat", "olivedrab"), palette.length = 9)
color.vector |
a vector of R colors. |
palette.length |
an integer number of colors in each palette. |
an object of class list
containing a list of color palettes.
Kevin Caye, Olivier François
plot.tess3Q
barplot.tess3Q
library(tess3r)
## Load A. thaliana example
data(data.at)
obj <- tess3(data.at$X, coord = data.at$coord, K = 5, ploidy = 1,
openMP.core.num = 4)
Qmatrix <- qmatrix(obj,K=5)
my.colors <- c("tomato", "yellow", "blue", "wheat","olivedrab")
my.palette <- CreatePalette(my.colors, 9)
plot(obj$Q, data.at$coord, method = "mapping.max", col.palette = my.palette,
cex = .4, xlab = "Longitude", ylab= "Latitude",
main = "Ancestry coefficients")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.