Do any ggplot2 wizards out there know how to make this look more visually intuitive? Specifically, I'm thinking of annotation at the beginning and end of each time period with the exact date (i.e., for Zhenla the bar would begin with an annotation saying 550 AD, and end with an annotation saying 802AD).
As an aside, I've looked at the annotation documentation and haven't found anything visually appealing. However, knowing ggplot2 and its family of packages as I do, I'm certain there is an attractive option out there.
I'm also curious about any other suggestions you all may have about making this more aesthetically pleasing.
Here's the data:
cambodia = data.frame(Period = c("Funan", "Chenla/Zhenla","Khmer Empire","Dark Ages of Cambodia"),StartDate = c(-500,550,802,1431), EndDate = c(550,802,1431,1863), Color = c("lightblue","lightgreen","lightyellow","pink"))
Note: "Color" does not correspond with the values given- it's more of a placeholder for the graph code:
g2 <- ggplot() +
geom_segment(data=cambodia, aes(x=StartDate, xend=EndDate, y=Period, yend=Period, color=Color), linetype=1, size=2) +
scale_colour_brewer(palette = "Pastel1")+
xlab("Time")+
ylab("Periods of History")+
theme_bw() + theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank()) + theme(aspect.ratio = .2)
g2 + theme(legend.position="none")