CreatePalette: Create a list of palettes

Description Usage Arguments Value Author(s) See Also Examples

View source: R/plotQ.R

Description

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

Usage

1
2
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<c3><a7>ois

See Also

plot.tess3Q barplot.tess3Q

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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")

cayek/TESS3_encho_sen documentation built on July 3, 2017, 4:26 p.m.