Learn R Programming

treescape (version 1.0.0)

plotGroves: Scatterplot of groups of trees

Description

This function displays the scatterplot of the Multidimensional Scaling (MDS) output by treescape, superimposing group information (derived by findGroves) using colors.

Usage

plotGroves(x, groups = NULL, xax = 1, yax = 2, type = c("chull",
  "ellipse"), col.pal = funky, bg = "white", lab.show = FALSE,
  lab.col = "black", lab.cex = 1, lab.optim = TRUE, point.cex = 1,
  scree.pal = NULL, scree.size = 0.2, scree.posi = c(0.02, 0.02), ...)

Arguments

Value

An adegraphics object (class: ADEgS)

Details

This function relies on s.class from the adegraphics package.

See Also

s.class

Examples

Run this code
if(require("adegenet") && require("adegraphics")){
## load data
data(woodmiceTrees)

## run findGroves: treescape+clustering
res <- findGroves(woodmiceTrees, nf=5, nclust=6)

## basic plot
plotGroves(res)

## adding labels
plotGroves(res, lab.show=TRUE)

## customizing
plotGroves(res, lab.show=TRUE,
bg="black", lab.col="white", scree.size=.35)

## customizing
plotGroves(res, type="ellipse", lab.show=TRUE,
lab.optim=FALSE, scree.size=.35)

## example with no group information
plotGroves(res$treescape$pco)

## adding labels
plotGroves(res$treescape$pco, lab.show=TRUE, lab.cex=2)

}

Run the code above in your browser using DataLab