Given this example dataset:
date <- seq(as.Date("2019-01-01"), as.Date("2019-12-31"), "days")
Y <- rnorm(length(date),0,1)
data.frame(date, Y) %>% ggplot(aes(y = Y, x = date)) + geom_point()
I get the following default plot:
The vertical lines appear on every 3rd month (1st day), with one in betweeen. I would like these lines to appear on every (1st day of) month.
Is there a way to do this automatically (without specifying the actual dates) - for instance can I tell it that I want 13 lines in total (1 for each month) ? Or any other ways would be interesting.
EDIT: The linked answers for duplicates do not address this situation. They create vertical lines for months AND corresponding labels. I am happy with the labels every 3 months - I just want the vertical lines to be every month