Skip to content

Instantly share code, notes, and snippets.

@ericpgreen
Last active August 1, 2018 15:06
Show Gist options
  • Select an option

  • Save ericpgreen/d3b202fb0d938217a7eeb7d1727aa416 to your computer and use it in GitHub Desktop.

Select an option

Save ericpgreen/d3b202fb0d938217a7eeb7d1727aa416 to your computer and use it in GitHub Desktop.
# 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