Skip to content

Instantly share code, notes, and snippets.

@masaha03
Created April 11, 2012 15:24
Show Gist options
  • Save masaha03/2360022 to your computer and use it in GitHub Desktop.
Save masaha03/2360022 to your computer and use it in GitHub Desktop.
boxplot
N.lv <- 5
x <- factor(rep(LETTERS[1:N.lv], each = 20))
y <- rnorm(100)
grp <- factor(rep(c("G1", "G2"), 50)) # Group 1 and 2
library(ggplot2)
qplot(x, y, geom="boxplot", fill=grp)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment