Created
January 7, 2011 14:19
-
-
Save arq5x/769496 to your computer and use it in GitHub Desktop.
Example of using qplot for a bar plot colored by sample or populations
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(ggplot2) | |
library(gridExtra) | |
cov <- read.table("/Users/arq5x/Documents/Projects/HallLab/TCGA-1KG/ForKeystone/tcga_and_1kg_span_cov.txt",header=TRUE) | |
span <- qplot(sample, span_cov, data=cov, fill=factor(type_num), geom="bar", | |
binwidth=1, | |
xlab="Sample", | |
ylab="Spanning coverage") + | |
opts(axis.ticks = theme_blank(), | |
axis.text.x = theme_blank(), | |
axis.title.x = theme_text(size = 18, face = "bold"), | |
axis.title.y = theme_text(size = 18, face = "bold", angle=90), | |
axis.text.y = theme_text(size=16)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment