The compoplot uses a barplot to represent the group assignment probability of individuals to several groups. It is a generic with methods for the following objects:
compoplot(x, ...)# S3 method for matrix
compoplot(
x,
col.pal = funky,
border = NA,
subset = NULL,
show.lab = FALSE,
lab = rownames(x),
legend = TRUE,
txt.leg = colnames(x),
n.col = 4,
posi = NULL,
cleg = 0.8,
bg = transp("white"),
...
)
# S3 method for dapc
compoplot(x, only.grp = NULL, border = NA, ...)
# S3 method for snapclust
compoplot(x, border = NA, ...)
an object to be used for plotting (see description)
further arguments to be passed to barplot
a color palette to be used for the groups; defaults to funky
a color for the border of the barplot; use NA
to
indicate no border.
a subset of individuals to retain
a logical indicating if individual labels should be displayed
a vector of individual labels; if NULL, row.names of the matrix are used
a logical indicating whether a legend should be provided for the colors
a character vector to be used for the legend
the number of columns to be used for the legend
the position of the legend
a size factor for the legend
the background to be used for the legend
a subset of groups to retain
Thibaut Jombart thibautjombart@gmail.com
matrix
: a matrix with individuals in row and genetic clusters in
column, each entry being an assignment probability of the corresponding
individual to the corresponding group
dapc
: the output of the dapc
function; in this case,
group assignments are based upon geometric criteria in the discriminant space
snapclust
: the output of the snapclust
function; in
this case, group assignments are based upon the likelihood of genotypes
belonging to their groups