Unlimited learning, half price | 50% off

Last chance! 50% off unlimited learning

Sale ends in


treespace (version 1.1.4.3)

plotGroves: Scatterplot of groups of trees

Description

This function displays the scatterplot of the Multidimensional Scaling (MDS) output by treespace, 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),
  ...
)

Value

An adegraphics object (class: ADEgS)

Arguments

x

a list returned by findGroves or a MDS with class dudi

groups

a factor defining groups of trees

xax

a number indicating which principal component to be used as 'x' axis

yax

a number indicating which principal component to be used as 'y' axis

type

a character string indicating which type of graph to use

col.pal

a color palette to be used for the groups

bg

the background color

lab.show

a logical indicating whether labels should be displayed

lab.col

a color for the labels

lab.cex

the size of the labels

lab.optim

a logical indicating whether label positions should be optimized to avoid overlap; better display but time-consuming for large datasets

point.cex

the size of the points

scree.pal

a color palette for the screeplot

scree.size

a size factor for the screeplot, between 0 and 1

scree.posi

either a character string or xy coordinates indicating the position of the screeplot.

...

further arguments passed to s.class

Author

Thibaut Jombart thibautjombart@gmail.com

Details

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

See Also

findGroves to find any clusters in the tree landscape s.class

Examples

Run this code

if (FALSE) {
if(require("adegenet") && require("adegraphics")){
## load data
data(woodmiceTrees)

## run findGroves: treespace+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$treespace$pco)

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

}
}

Run the code above in your browser using DataLab