Skip to content

Instantly share code, notes, and snippets.

@sneakers-the-rat
Created August 8, 2018 23:18
Show Gist options
  • Save sneakers-the-rat/d51d67c80ff61d0c37adc3b28198432f to your computer and use it in GitHub Desktop.
Save sneakers-the-rat/d51d67c80ff61d0c37adc3b28198432f to your computer and use it in GitHub Desktop.
timeline resume plot for aakash
library(ggplot2)
jobs <- data.frame(start=c(2000, 2006, 2008, 2009, 2014),
end =c(2005, 2009, 2010, 2015, 2015),
idx = rev(seq(5)),
name =as.ordered(c("job a", 'job b', 'job c', 'job d', 'job e')))
g.job <- ggplot(jobs)+
geom_rect(aes(xmin=start, xmax=end, ymin=idx, ymax=idx+1, fill=name))+
scale_fill_grey(start=0, end=0.8)+
theme_minimal()+
theme(
axis.text.y = element_blank(),
panel.grid = element_blank(),
legend.position='none',
axis.ticks.x = element_line(),
)
ggsave("~/aakash_jobs.pdf", g.job, width=1.5, height=3, unit="pt")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment