traitData.plot {motmot} | R Documentation |
plot a univariate continuous trait data on a phylogeny
Description
Plots a phylogeny with lines representing the value of a continuous trait
Usage
traitData.plot(
y,
phy,
col.label = "red",
col.tree = "black",
col.hist = "navy",
cex.plot = 0.7,
cex.tips = 0.7,
show.tips = FALSE,
include.hist = FALSE,
n.split = 5,
lwd.traits = 1,
show.axis = TRUE,
axis.text = NULL,
transform.axis.label = NULL,
at = NULL,
labels = NULL,
axis.text.line = 1,
offset.bars = 1,
...
)
Arguments
y |
A matrix of trait values with taxon names as rownames. |
phy |
An object of class |
col.label |
colour labels for the traits at the tips and in the histogram |
col.tree |
colour for the edge labels on the tree |
col.hist |
colour of the histogram |
cex.plot |
Numeric. The size of labels for the histogram axis labels |
cex.tips |
Numeric. The size of the phylogeny tip labels |
show.tips |
Logical. If FALSE (default), no tip labels are shown. If TRUE, tip labels are shown |
include.hist |
Logical. Include a histrogram alongside the plot of the tree? |
n.split |
Numeric. The number of splits for the axis labels and shading for the trait values |
lwd.traits |
Line widths of traits shown on the plot |
show.axis |
Logical. If TRUE, shows the axis of trait values on the plot. |
axis.text |
text shown above the trait label axis. If NULL (default), nothing is displayed |
transform.axis.label |
If the data are provided as logarithms the labels for trait axis can be transformed to their original values by calculating the exponential function of the natural (transform.axis.label="exp") or base 10 logarithm. The default (NULL) leaves the labels un-transformed. |
at |
Axis tick point locations for if show.axis is TRUE. |
labels |
Axis labels locations for if show.axis is TRUE. |
axis.text.line |
The location of the label for the trait axis beside the plot. |
offset.bars |
The distance of trait plot lines from the phylogeny. |
... |
further arguments passed to the axis function |
Value
A plot with the trait values shown at the tips, and a histrogram of the trait values
Author(s)
Mark Puttick
Examples
data(anolis.tree)
data(anolis.data)
attach(anolis.data)
male.length <- matrix(Male_SVL, dimnames=list(rownames(anolis.data)))
sortedData <- sortTraitData(anolis.tree, male.length)
phy <- sortedData$phy
male.length <- sortedData$trait
traitData.plot(y=male.length, phy)