I\'m trying to using ggplot2
to plot this: But as you can see on the x axis you can\'t read anything...
So how can I show on the x axis the value every
The other answers have covered the case where your dates are numerical years, but if (as @Gregor notes) your dates are actual Date
objects, it's a lot easier:
scale_x_date(name = 'My date axis title', date_breaks = '20 years',
date_labels = '%Y')
With scale_date, you can control the breaks with intuitive language and the labelling with (hopefully) familiar strptime notation.