library(magrittr)
library(reshape2)
library(ggplot2)
library(ggthemes)
p <- data.frame(ctrl = rnorm(10000,0,1), treat = rnorm(10000,1,1)) %>%
melt %>%
ggplot(., aes(x=value, fill=variable)) +
scale_fill_colorblind()
## No id variables; using all as measure variables
# Overlaid histograms
p + geom_histogram(alpha=.5, position="identity")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

# Interleaved histograms
p + geom_histogram(position="dodge")
## stat_bin: binwidth defaulted to range/30. Use 'binwidth = x' to adjust this.

# Density plots
p + geom_density()

# Density plots with semi-transparent fill
p + geom_density(alpha=.3)
