This function provides a general interface to plot phylo4d
object
(i.e. phylogenetic tree and data).
multiplot.phylo4d(
p4d,
trait = names(tdata(p4d)),
center = TRUE,
scale = TRUE,
plot.type = "barplot",
tree.ladderize = FALSE,
tree.type = "phylogram",
tree.ratio = NULL,
tree.xlim = NULL,
tree.open.angle = 0,
tree.open.crown = TRUE,
show.tip = TRUE,
tip.labels = NULL,
tip.col = "black",
tip.cex = 1,
tip.font = 3,
tip.adj = 0,
data.xlim = NULL,
bar.lwd = 10,
bar.col = "grey35",
show.data.axis = TRUE,
dot.col = "black",
dot.pch = 20,
dot.cex = 2,
cell.col = white2red(100),
show.color.scale = TRUE,
show.trait = TRUE,
trait.labels = NULL,
trait.col = "black",
trait.cex = 1,
trait.font = 1,
trait.bg.col = "grey90",
error.bar.sup = NULL,
error.bar.inf = NULL,
error.bar.col = 1,
show.box = FALSE,
grid.vertical = TRUE,
grid.horizontal = FALSE,
grid.col = "grey25",
grid.lty = "dashed",
...
)
a phylo4d
object.
the traits in the phylo4d
object to include in the plot.
Can be a character vector giving the name of the traits or numbers giving the column index
in the table of the data slot of the p4d object. Can be used to reorder the traits in the plot.
a logical indicating whether traits values should be centered.
a logical indicating whether traits values should be scaled.
a character string specifying the type of plot for traits data.
Can be "barplot
", "dotplot
" or "gridplot
".
a logical indicating whether the tree should be (right) ladderized.
a character string specifying the type of phylogeny to be drawn.
Can be "phylogram
", "cladogram
" or "fan
".
a numeric value in [0, 1] giving the proportion of width of the figure for the tree.
a numeric vector of length 2 giving the limits of the x-axis for the tree. If NULL
,
it is determined automatically.
a numeric value giving the angle in degrees left blank if tree.type = "fan"
.
a logical indicating whether the crowns should be drawn following the value
of tree.open.angle
(default TRUE
).
logical indicating whether tips labels should be drawn.
character vector to label the tips.
If NULL
the tips labels of the phylo4d
object are used
a vector of R colors to use for the tips labels. Recycled if necessary.
a numeric vector to control character size of the tips labels. Recycled if necessary.
an integer vector specifying the type of font for the tips labels: 1 (plain text), 2 (bold), 3 (italic), or 4 (bold italic). Recycled if necessary.
a vector of numeric in [0, 1] to control tips labels justification: 0 (left-justification), 0.5 (centering), or 1 (right-justification). Recycled if necessary.
numeric vector of length 2 or matrix giving the x coordinates range for the barplots/dotplots (see Details).
a vector of numeric giving bar widths of the barplot(s). Recycled along the tips, reapeated for each trait.
a vector of R colors to use for the bars. Recycled along the tips, reapeated for each trait. The user can also provide a matrix for a finer tuning (see Details)
logical indicating whether barplots/dotplots axes should be drawn.
a vector of R colors to use for the points. Recycled along the tips, reapeated for each trait. The user can also provide a matrix for a finer tuning (see Details)
a numerical vector of symbol to use for the points. Recycled along the tips, reapeated for each trait. The user can also provide a matrix for a finer tuning (see Details)
a numerical vector. Character (or symbol) expansion for the points. Recycled along the tips, reapeated for each trait. The user can also provide a matrix for a finer tuning (see Details)
a vector of colors for gridplot
cells.
Easily generated by heat.colors
,
topo.colors
, terrain.colors
or other functions created with colorRampPalette
.
logical indicating whether color scale should be drawn.
logical indicating whether traits labels should be drawn.
character vector to label the traits.
If NULL
the traits labels of the phylo4d
object are used.
a vector of R colors to use for the traits labels. Recycled if necessary.
a numeric vector to control character size of the trait labels. Recycled if necessary.
an integer vector specifying the type of font for the traits labels: 1 (plain text), 2 (bold), 3 (italic), or 4 (bold italic). Recycled if necessary.
a vector of R colors to use for the background of the barplots. Recycled if necessary.
a matrix giving the superior limit for error bars. Columns and rows names must match with traits and tips labels, respectively.
a matrix giving the inferior limit for error bars. Columns and rows names must match with traits and tips labels, respectively.
a vector of R colors to use for the bars. Recycled along the tips, reapeated for each trait. The user can also provide a matrix for a finer tuning (see Details)
a logical indicating whether a box should be drawn around the plots.
a logical incating whether vertical lines of the grid should be drawn.
a logical incating whether horizontal lines of the grid should be drawn.
a vector of R colors to use for the lines of the grid.
the lines type of the grid. Possibly a vector.
further arguments to be passed to plot.phylo
.