Skip to content

Instantly share code, notes, and snippets.

@philippbayer
Created July 4, 2017 08:34
Show Gist options
  • Select an option

  • Save philippbayer/30737b4a8460f7101c89cd7375800df6 to your computer and use it in GitHub Desktop.

Select an option

Save philippbayer/30737b4a8460f7101c89cd7375800df6 to your computer and use it in GitHub Desktop.
Phytools barplot
library(phytools)
library(RColorBrewer)
tree <- read.newick('./tree.txt')
a <- read.table('r_genes.csv', head=T, stringsAsFactors = F, row.names = 1)
plotTree.barplot(tree,a, args.plotTree=list(fsize=0.7), args.barplot=list(col=brewer.pal(length(colnames(a)),'Set3'), legend.text=T, xpd=T,args.legend=list(horiz=F, x=400, y=35, cex=0.7, ncol=2)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment