treePlot-methods: Phylogeny plotting

Description Usage Arguments Value Methods Author(s) See Also Examples

Description

Plot phylo4 or phylo4d objects, including associated data.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
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, ...)

Arguments

phy

A phylo4 or phylo4d object

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 phylo4d data should be plotted

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

edge.color

A vector of colors in the order of edges(phy)

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 edges(phy) indicating the widths of edge lines

newpage

Logical indicating whether the page should be cleared before plotting

plot.at.tip

should the data plots be at the tip? (logical)

margins

number of lines around the plot (similar to par(mar)).

...

Arguments to be passed to methods, such as graphical parameters (see par). Many methods will accept the following arguments:

type

what type of plot should be drawn. Possible types are

  • "p" for points,

  • "l" for lines,

  • "b" for both,

  • "c" for the lines part alone of "b",

  • "o" for both ‘overplotted’,

  • "h" for ‘histogram’ like (or ‘high-density’) vertical lines,

  • "s" for stair steps,

  • "S" for other steps, see ‘Details’ below,

  • "n" for no plotting.

All other types give a warning or an error; using, e.g., type = "punkte" being equivalent to type = "p" for S compatibility. Note that some methods, e.g. plot.factor, do not accept this.

main

an overall title for the plot: see title.

sub

a sub title for the plot: see title.

xlab

a title for the x axis: see title.

ylab

a title for the y axis: see title.

asp

the y/x aspect ratio, see plot.window.

x

the coordinates of points in the plot. Alternatively, a single plotting structure, function or any R object with a plot method can be provided.

y

the y coordinates of points in the plot, optional if x is an appropriate structure.

Value

No return value, function invoked for plotting side effect

Methods

phy = "phylo4"

plots a tree of class phylo4

phy = "phylo4d"

plots a tree with one or more quantitative traits contained in a phylo4d object.

Author(s)

Peter Cowan pdc@berkeley.edu

See Also

phylobubbles

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## example of plotting two grid plots on the same page
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)

phylobase documentation built on May 2, 2019, 6:49 p.m.