R version 3.3.2. Using ggplot2
and timeline
.
I am trying to create a sensible and aesthetically pleasing timeline. Here is my data:
cambodia.events = data.frame(Event = c("French protectorate established", "French protectorate\nbrutally responds to Cambodian\nuprising","Japanese government formally\n recognizes Kingdom of Cambodia","French forces reimpose\ncolonial administration","French grant Cambodian sovereignty", "Military coup of Norodom Sihanouk","Khmer Republic surrender and beginning of Khmer Rouge"),Date=c(1863,1885,1945,1945,1953,1970,1975))
cambodia = data.frame(Grouping = c("Ruling Body","Ruling Body","Ruling Body","Ruling Body","Ruling Body","War","Ruling Body","Ruling Body","War","Ruling Body","Ruling Body","Ruling Body"),Period = c("Funan", "Chenla/Zhenla","Khmer Empire","Dark Ages of Cambodia","French Protectorate","World War Two","King Norodom Sihanouk's Rule","Khmer Regime","Vietnam War","Khmer Rouge","People's Republic of Kampuchea","Modern Cambodia"),StartDate = c(-500,550,802,1431,1863,1939,1953,1970,1955,1975,1979,1993), EndDate = c(550,802,1431,1863,1953,1945,1970,1975,1975,1979,1993,2017))
Here is the code:
require(timeline)
p <- timeline(cambodia, cambodia.events, label.col = names(cambodia)[2],
group.col = names(cambodia)[1], start.col = names(cambodia)[3],
end.col = names(cambodia)[4], text.size = 4,
text.color = "black", num.label.steps = 5,
event.label.col = names(cambodia.events)[1], event.col = names(cambodia.events)[2], event.group.col = names(cambodia.events)[1],
event.spots = 2, event.label='',
event.label.method = 1, event.line = TRUE,
event.text.size = 4, event.above = FALSE)
p + theme_bw() + theme(panel.grid.minor = element_blank(), panel.grid.major = element_blank(), axis.title.y=element_blank(),axis.text.y=element_blank(), axis.ticks.y=element_blank()) + theme(legend.position="none")
Yielding this graph.
What I would like is to be able to retain the information about Cambodia's past kingdoms, while also showing modern events. Dealing with the color and theme will come later.
I have tried resizing the x axis, which did not really solve the problem and also made things a little too vague ("Funan existed around shrug"). I also tried resizing the text, but that only made the text smaller- it didn't translate into the plot encompassing the information.
So, without oversimplifying the x-axis, is there a way to accomplish this?
Note: I have looked at both of these recommended questions, and neither answer my question.