Last active
August 1, 2018 15:06
-
-
Save ericpgreen/d3b202fb0d938217a7eeb7d1727aa416 to your computer and use it in GitHub Desktop.
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
| # plot individual lines | |
| ggplot() + | |
| # plot N-2 as a base layer | |
| geom_line(data = datL[datL$highlight>2,], | |
| aes(time, depress, color=factor(highlight), group=ID), size=0.5) + | |
| # highlight two individuals and plot them second to appear on top | |
| geom_line(data = datL[datL$highlight<3,], | |
| aes(time, depress, color=factor(highlight), group=ID), size=1) + | |
| scale_color_manual(values=c("#ff0000", "#0000ff", "#D3D3D3")) + | |
| scale_size_manual(values=c(1, 1, 0.5)) + | |
| facet_wrap(~w1group) + | |
| theme_bw() + | |
| theme(legend.position="none") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment