treePlot-methods | R Documentation |
Plot phylo4
or phylo4d
objects, including associated data.
treePlot(
phy,
type = c("phylogram", "cladogram", "fan"),
show.tip.label = TRUE,
show.node.label = FALSE,
tip.order = NULL,
plot.data = is(phy, "phylo4d"),
rot = 0,
tip.plot.fun = "bubbles",
plot.at.tip = TRUE,
edge.color = "black",
node.color = "black",
tip.color = "black",
edge.width = 1,
newpage = TRUE,
margins = c(1.1, 1.1, 1.1, 1.1),
...
)
plot(x, y, ...)
## S4 method for signature 'phylo4,missing'
plot(x, y, ...)
phy |
A |
type |
A character string indicating the shape of plotted tree |
show.tip.label |
Logical, indicating whether tip labels should be shown |
show.node.label |
Logical, indicating whether node labels should be shown |
tip.order |
If NULL the tree is plotted with tips in preorder, if "rev" this is reversed. Otherwise, it is a character vector of tip labels, indicating their order along the y axis (from top to bottom). Or, a numeric vector of tip node IDs indicating the order. |
plot.data |
Logical indicating whether |
rot |
Numeric indicating the rotation of the plot in degrees |
tip.plot.fun |
A function used to generate plot at the each tip of the phylogenetic trees |
plot.at.tip |
should the data plots be at the tip? (logical) |
edge.color |
A vector of colors in the order of |
node.color |
A vector of colors indicating the colors of the node labels |
tip.color |
A vector of colors indicating the colors of the tip labels |
edge.width |
A vector in the order of |
newpage |
Logical indicating whether the page should be cleared before plotting |
margins |
number of lines around the plot (similar to |
... |
additional arguments |
x |
A |
y |
(only here for compatibility) |
Currently, treePlot
can only plot numeric values
for tree-associated data. The dataset will be subset to only
include columns of class numeric
, integer
or
double
. If a phylo4d
object is passed to the
function and it contains no data, or if the data is in a format
that cannot be plotted, the function will produce a warning. You
can avoid this by using the argument plot.data=FALSE
.
No return value, function invoked for plotting side effect
plots a tree of class phylo4
plots a tree with one or more quantitative traits contained in a phylo4d object.
Peter Cowan pdc@berkeley.edu, Francois Michonneau
phylobubbles
## example of plotting two grid plots on the same page
library(grid)
data(geospiza)
geotree <- extractTree(geospiza)
grid.newpage()
pushViewport(viewport(layout=grid.layout(nrow=1, ncol=2), name="base"))
pushViewport(viewport(layout.pos.col=1, name="plot1"))
treePlot(geotree, newpage=FALSE)
popViewport()
pushViewport(viewport(layout.pos.col=2, name="plot2"))
treePlot(geotree, newpage=FALSE, rot=180)
popViewport(2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.