Created
October 26, 2016 02:18
-
-
Save arvi1000/e79b3c190690645ff18e23f7bc9f0920 to your computer and use it in GitHub Desktop.
Roughly replicating Erica's plot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| library(ggplot2) | |
| # random data | |
| set.seed(5) | |
| my_data <- data.frame(y = rnorm(15*5, mean=0, sd=2) + 3, | |
| x = rep(letters[1:5], each=5)) | |
| # plot: jittered points + boxplot overlay | |
| ggplot(my_data, aes(x=x, y=y)) + | |
| geom_jitter(aes(color=x, shape=x), width = 0.2) + | |
| geom_boxplot(fill=NA, size=0.2, outlier.shape = NA) + | |
| geom_hline(yintercept=0.5, linetype='dotted', color='red') + | |
| theme_classic() + | |
| theme(legend.position = 'none') |
arvi1000
commented
Oct 26, 2016
Author

Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment