The code for this function can be found here.

The arguments to pass to the function are:

I will demonstrate thie plotting function using two posterior sets of phylogenies that were constructedd with and without topological constraints respectively. In doing so, we can see which taxa have their branch lengths affected the most through specification of topological constraints.

library(ape)

# The function
source("branch.length.diff.R")

# The data
multiPhy <- read.nexus("set1.nex")

multiPhy1 <- read.nexus("set2.nex")

A standard use of the function

branch.length.diff(multiPhy, multiPhy1)

Add a legend showing the five highest values

branch.length.diff(multiPhy, multiPhy1, show.top = 5)

Alternatively, only plot the five highest values

branch.length.diff(multiPhy, multiPhy1, plot.top = 5, 
                   pt.cex = 2, bar.width = 2, label.horiz = TRUE, taxon.label.cex = 0.7)