motmot.2.0 (version 1.1.2)

traitData.plot: 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",
  cex.plot = 0.7, include.hist = F)

Arguments

y

A matrix of trait values with taxon names as rownames.

phy

An object of class "phylo" (see ape package).

col.label

colour labels for the traits at the tips and in the histogram

col.tree

colour for the edge labels on the tree

cex.plot

Numeric. The size of labels for the histogram axis labels

include.hist

Logical. Include a histrogram alongside the plot of the tree?

Value

A plot with the trait values shown at the tips, and a histrogram of the trait values

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab