3 \title{Zoom on a Portion of a Phylogeny}
5 This function plots simultaneously a whole phylogenetic tree
6 (supposedly large) and a portion of it.
9 zoom(phy, focus, subtree = FALSE, col = rainbow, ...)
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
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}.}
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.
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.
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
40 \author{Emmanuel Paradis}
42 \code{\link{plot.phylo}}, \code{\link{drop.tip}},
43 \code{\link[graphics]{layout}}, \code{\link[grDevices]{rainbow}},
44 \code{\link[grDevices]{grey}}
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)))