Skip to content

Instantly share code, notes, and snippets.

@michaelbarton
Created June 28, 2010 00:22
Show Gist options
  • Save michaelbarton/455299 to your computer and use it in GitHub Desktop.
Save michaelbarton/455299 to your computer and use it in GitHub Desktop.
#!/usr/bin/env Rscript
library(ggplot2)
data <- data.frame(
strain = c("R124","Pf0-1","SBW25","Pf-5"),
size = c(4762173,6438405,6722539,7074893)
)
sizes <- factor(1:4)
levels(sizes) <- c("Pf-5","SBW25","Pf0-1","R124")
p <- ggplot(data,aes(x=factor(strain,sizes),y=size / 1000000))
p <- p + scale_y_continuous("Genome size (MBp)")
p <- p + scale_x_discrete("Pseudomonas fluorescens strain")
p <- p + geom_bar() + theme_bw()
png("genome_size.png")
print(p)
graphics.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment