1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotGroves.R
\name{plotGroves}
\alias{plotGroves}
\title{Scatterplot of groups of trees}
\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{
\item{x}{a list returned by \code{\link{findGroves}} or a MDS with class \code{dudi}}
\item{groups}{a factor defining groups of trees}
\item{xax}{a number indicating which principal component to be used as 'x' axis}
\item{yax}{a number indicating which principal component to be used as 'y' axis}
\item{type}{a character string indicating which type of graph to use}
\item{col.pal}{a color palette to be used for the groups}
\item{bg}{the background color}
\item{lab.show}{a logical indicating whether labels should be displayed}
\item{lab.col}{a color for the labels}
\item{lab.cex}{the size of the labels}
\item{lab.optim}{a logical indicating whether label positions should be optimized to avoid overlap; better display but time-consuming for large datasets}
\item{point.cex}{the size of the points}
\item{scree.pal}{a color palette for the screeplot}
\item{scree.size}{a size factor for the screeplot, between 0 and 1}
\item{scree.posi}{either a character string or xy coordinates indicating the position of the screeplot.}
\item{...}{further arguments passed to \code{\link{s.class}}}
}
\value{
An \code{adegraphics} object (class: \code{ADEgS})
}
\description{
This function displays the scatterplot of the Multidimensional
Scaling (MDS) output by treespace, superimposing group information
(derived by \code{\link{findGroves}}) using colors.
}
\details{
This function relies on \code{\link[adegraphics]{s.class}}
from the \code{adegraphics} package.
}
\examples{
\dontrun{
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)
}
}
}
\seealso{
\code{\link{findGroves}} to find any clusters in the tree landscape
\code{\link[adegraphics]{s.class}}
}
\author{
Thibaut Jombart \email{thibautjombart@gmail.com}
}
|