Created
June 20, 2017 09:58
-
-
Save kohske/277a47d5f031057e7e0a249413f853b4 to your computer and use it in GitHub Desktop.
ggplot2 group inspection
This file contains 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) | |
d = data.frame(expand.grid(x=letters[1:4], g=factor(1:2)), y=rnorm(8)) | |
p = ggplot(d, aes(x=x, y=y, colour=as.numeric(g))) + geom_line() + geom_point() | |
g = ggplot_build(p) | |
g$data |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment