Skip to content

Instantly share code, notes, and snippets.

@epijim
Created October 1, 2013 13:43
Show Gist options
  • Save epijim/6778646 to your computer and use it in GitHub Desktop.
Save epijim/6778646 to your computer and use it in GitHub Desktop.
a histograph with a bar chart overlaid
# data
set.seed(4566)
data <- rnorm(100)
# Added to the plot:
par(mar=c(3.1, 3.1, 1.1, 2.1))
hist(data,xlim=c(-4,4), col = "pink")
boxplot(data, horizontal=TRUE, outline=TRUE, ylim=c(-4,4), frame=F, col = "green1", add = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment