You can customize this to suit your needs, but here is the basic concept:
, , . fill scale_colour_manual, . colour , .
df <- data.frame(
divergence = rnorm(10),
exons = paste("E", sample(1:20, 10, TRUE), sep = ""),
probset_id = sample(letters, 10, FALSE)
)
df$fill <- with(df, ifelse(divergence > .3, 1,0))
ggplot(data = df, aes(as.character(exons), divergence, fill = factor(fill))) +
geom_histogram(colour = "red", legend = FALSE) +
scale_fill_manual(values = c("1" = "red", "0" = "white"), legend = FALSE) +
facet_grid(~ probset_id, scales="free_x", space= "free") +
theme_bw() + opts(title="GRP78/HSPA5 (HRN vs LR)")
- . set.seed() , , :
