Plot a tree, highlighting any ladders within it.

ladderShow(
  tree,
  mainCol = "black",
  ladderEdgeCol = "red",
  ladderNodeCol = "red",
  ...
)

Arguments

tree

a tree of class phylo or phylo4. The tree should be binary and rooted; if not it will be coerced into a binary rooted tree using multi2di, if possible.

mainCol

colour for edges which are not ladders (default is black)

ladderEdgeCol

colour for ladder edges (default is red)

ladderNodeCol

colour for ladder nodes (default is red)

...

further arguments to be passed to plot.phylo

Value

A plot of the tree, with ladder edges and nodes highlighted by colour.

See also

Author

Michelle Kendall michelle.louise.kendall@gmail.com

Michael Boyd mboyd855@gmail.com

Examples

## Highlight in blue the ladders in a random tree with 50 tips:
tree <- rtree(50)
ladderShow(tree, edge.width=2)

# compare to:
ladderSizes(tree)
#> $ladderSizes
#> [1] 4 2 2 2
#> 
#> $ladderNodes
#>  [1] 52 53 60 61 92 93 95 96 97 98
#> 
#> $ladderEdges
#> [1] 89 90 91  3 18 83
#>