Skip to content

Instantly share code, notes, and snippets.

@nmatzke
Created March 2, 2017 03:28
Show Gist options
  • Save nmatzke/8d2aba1d1d31042647b35ddced55e7ce to your computer and use it in GitHub Desktop.
Save nmatzke/8d2aba1d1d31042647b35ddced55e7ce to your computer and use it in GitHub Desktop.
# Simple setup of a human/chimp/etc. phylogeny
# by Nick Matzke
#######################################################
# Phylogeny versus cladogram
#######################################################
# Tree specification
newick_string = "((((human:6,chimp:6):1,gorilla:7):6,orang:13):5,gibbon:18);"
tr = read.tree(file="",text=string)
plot(ladderize(tr, right=FALSE), cex=1.5); axisPhylo(cex=2); title("Dated phylogeny of humans and closest relatives"); mtext("millions of years ago", side=1, line=3)
plot(ladderize(tr, right=FALSE), cex=1.5, type="cladogram"); title("Cladogram of humans and closest relatives\n(branch lengths irrelevant)"); mtext("x-axis not meaningful", side=1, line=3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment