Skip to content

Instantly share code, notes, and snippets.

@juanchiem
Created May 19, 2021 00:12
Show Gist options
  • Save juanchiem/4244c545413f3350aa73f0cfd0f16244 to your computer and use it in GitHub Desktop.
Save juanchiem/4244c545413f3350aa73f0cfd0f16244 to your computer and use it in GitHub Desktop.
gg<-expand.grid(type=letters[1:4], year=2000:2004)
df<-data.frame(gg, emissions=runif(nrow(gg)*10))
df %>%
ggplot() +
aes(x=year, y=emissions)+
geom_line(stat = "summary", linetype= "dashed", fun=mean)+
geom_line(stat = "summary", fun=mean, aes(col=type))
@juanchiem
Copy link
Author

image

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