Learn R Programming

MorphSim (version 0.1.0)

plot.morpho: Plot full evolutionary history

Description

This function creates a plot showing continuous evolution of discrete traits.

Usage

# S3 method for morpho
plot(
  x = NULL,
  trait = NULL,
  timetree = FALSE,
  show.fossil = FALSE,
  reconstructed = FALSE,
  root.edge = FALSE,
  edge.width = 1,
  label.offset = 0.05,
  e.cex = 0.5,
  f.cex = 1,
  box.cex = 4,
  col = c("#fdfdfd", "lightgray", "lightblue", "pink", "yellow", "green", "orange"),
  col.timescale = "darkgrey",
  ...
)

Value

No return value, called for its side effect of producing a plot.

Arguments

x

A morpho object

trait

The trait number to plot.

timetree

TRUE or FALSE. Indicate whether you want to plot a time tree or not. Default = FALSE (uses distance tree if FALSE).

show.fossil

Plot the fossil along the tree. Default = FALSE.

reconstructed

Plot the reconstructed tree. Default = FALSE.

root.edge

If TRUE plot the root edge. Default = FALSE.

edge.width

Width of the branches.

label.offset

Distance of tip label to tree tips.

e.cex

Size of extant taxa.

f.cex

Size of fossils.

box.cex

Size of traits on plot

col

A vector of colors that should be the same length or longer than the number of different character states (k). If not specified, the traits from 0 to 6 can be differentiated.

col.timescale

A single color for the timescale. Default = "darkgrey".

...

Other arguments to be passed to methods, such as graphical parameters.

Examples

Run this code
# simulate a phylogenetic tree
data(morpho_data)
plot(morpho_data, trait = 4, timetree = FALSE, show.fossil = FALSE,
     root.edge = FALSE, reconstructed = FALSE)

Run the code above in your browser using DataLab