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)

Arguments

color.vector

a vector of R colors.

palette.length

an integer number of colors in each palette.

Value

an object of class list containing a list of color palettes.

See also

plot.tess3Q barplot.tess3Q

Examples

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)
#> == Computing spectral decomposition of graph laplacian matrix: done #> ==Main loop with 4 threads: done
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")