I would like add text labels on a date plot next to the data-points. E.g in the following simple example the text labels fall on top of the data-points. I thought about using nudge_x
to move the labels towards the left as in the plot with numeric x axis:
df <- data_frame(xDate = seq.Date(from = as.Date("2012-01-01"), to = as.Date("2016-01-01"), by = "year"),
xNumeric = 1:5,
y = 6:10,
names = letters[1:5])
df %>%
ggplot(aes(x = xDate, y = y)) +
geom_point() +
geom_label(aes(label = names))
df %>%
ggplot(aes(x = xNumeric, y = y)) +
geom_point() +
geom_label(aes(label = names), nudge_x = -0.5)