#!/usr/bin/Rscript m <- c(3279005676, 21077, 12957, 157480, 23340186, 3272480989, 22253, 12308, 142746, 17981254, 3253037807, 21541, 2081, 48400, 13099397, 3433077231, 21206, 719, 25078, 10094084) dim(m) <- c(5,4) row.names(m) <- c("Base Pairs", "Known protein-coding genes", "Pseudogenes", "Gene transcripts", "Single Nucleotide Polymorphisms") colnames(m) <- c("Current", "57: Mar 2010", "49: May 2008", "38: Apr 2006") pdf(file="plot.pdf", width=12) p <- barplot(log10(t(m)), beside=TRUE, legend.text=TRUE, ylab="Amount (log10)", main="Comparison of the human genome assemblies") text(p, 1.5, labels=t(m), srt=90) dev.off()