CreatePalette: Create a list of palettes

View source: R/plotQ.R

CreatePaletteR Documentation

Create a list of palettes

Description

This function creates a list of color palettes for the plot and barplot functions

Usage

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.

Author(s)

Kevin Caye, Olivier François

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)
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")

bcm-uga/TESS3_encho_sen documentation built on June 30, 2023, 3:08 a.m.