Skip to content

Instantly share code, notes, and snippets.

@corynissen
Last active August 29, 2015 14:07
Show Gist options
  • Save corynissen/6599f5f7ec17ebfa4c6b to your computer and use it in GitHub Desktop.
Save corynissen/6599f5f7ec17ebfa4c6b to your computer and use it in GitHub Desktop.
Attempt at making a dashboard-y graph in ggplot2
# trying to create a graph as seen here: https://twitter.com/Cnnct2me/status/522429612089819136
df <- data.frame(time=1:100, why=runif(100, 72, 83))
ggplot(df) +
geom_ribbon(aes(x=time, ymin=72, ymax=why), color="white", fill="white") +
coord_cartesian(ylim=c(70, 85)) +
theme(panel.background = element_rect(fill = '#3FE874'),
plot.background = element_blank(),
panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
panel.border = element_blank(),
axis.text.x=element_blank(),
axis.text.y=element_blank(),
axis.ticks=element_blank(),
axis.title.x=element_blank(),
axis.title.y=element_blank())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment