]> git.donarmstrong.com Git - ape.git/blob - man/zoom.Rd
314f3a3fe4b4028833d6b677a2ef258d83273ac1
[ape.git] / man / zoom.Rd
1 \name{zoom}
2 \alias{zoom}
3 \title{Zoom on a Portion of a Phylogeny}
4 \description{
5   This function plots simultaneously a whole phylogenetic tree
6   (supposedly large) and a portion of it.
7 }
8 \usage{
9 zoom(phy, focus, subtree = FALSE, col = rainbow, ...)
10 }
11 \arguments{
12   \item{phy}{an object of class \code{"phylo"}.}
13   \item{focus}{a vector, either numeric or character, or a list of
14     vectors specifying the tips to be focused on.}
15   \item{subtree}{a logical indicating whether to show the context of the
16     extracted subtrees.}
17   \item{col}{a vector of colours used to show where the subtrees are in
18     the main tree, or a function .}
19   \item{\dots}{further arguments passed to \code{plot.phylo}.}
20 }
21 \details{
22   This function aims at exploring very large trees. The main argument is
23   a phylogenetic tree, and the second one is a vector or a list of
24   vectors specifying the tips to be focused on. The vector(s) can be
25   either numeric and thus taken as the indices of the tip labels, or
26   character in which case it is taken as the corresponding tip labels.
27
28   The whole tree is plotted on the left-hand side in a narrower
29   sub-window (about a quarter of the device) without tip labels. The
30   subtrees consisting of the tips in `focus' are extracted and plotted
31   on the right-hand side starting from the top left corner and
32   successively column-wise.
33
34   If the argument `col' is a vector of colours, as many colours as the
35   number of subtrees must be given. The alternative is to give a
36   function that will create colours or grey levels from the number of
37   subtrees: see \code{\link[grDevices]{rainbow}} for some possibilities
38   with colours.
39 }
40 \author{Emmanuel Paradis \email{Emmanuel.Paradis@mpl.ird.fr}}
41 \seealso{
42   \code{\link{plot.phylo}}, \code{\link{drop.tip}},
43   \code{\link[graphics]{layout}}, \code{\link[grDevices]{rainbow}},
44   \code{\link[grDevices]{grey}}
45 }
46 \examples{
47 \dontrun{
48 data(chiroptera)
49 zoom(chiroptera, 1:20, subtree = TRUE)
50 zoom(chiroptera, grep("Plecotus", chiroptera$tip.label))
51 zoom(chiroptera, list(grep("Plecotus", chiroptera$tip.label),
52                       grep("Pteropus", chiroptera$tip.label)))
53 }
54 }
55 \keyword{hplot}