Skip to content

Instantly share code, notes, and snippets.

@stormxuwz
Created October 24, 2014 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stormxuwz/68da5263ba8c8435cecc to your computer and use it in GitHub Desktop.
Save stormxuwz/68da5263ba8c8435cecc to your computer and use it in GitHub Desktop.
box plot from summary
# http://stackoverflow.com/questions/10628847/geom-boxplot-with-precomputed-values
library(ggplot2)
DF <- data.frame(x=c("A","B"), min=c(1,2), low=c(2,3), mid=c(3,4), top=c(4,5), max=c(5,6))
ggplot(DF, aes(x=x, ymin = min, lower = low, middle = mid, upper = top, ymax = max)) +
geom_boxplot(stat = "identity")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment