У меня есть данные вроде
data = as.data.frame( rbind( c("1492", "Columbus sailed the ocean blue"),
c("1976", "Americans listened to Styx"),
c("2008", "financial meltdown. great.")
))
и я хочу построить график в ggplot2
, который отобразит стрелку для времени aes(x=$V1)
и текст для aes(label=$V2)
. Это звучало довольно просто, пока я не попытался его нарисовать.
update: Я не писал его, но вам нужно сделать as.Date("1492", format="%Y")
для правильного воспроизведения.
NB: Решения, приведенные ниже, относятся только к событиям, которые происходят в определенную дату, а не к срокам с "периодами" или "эрами".