I want to highlight some days in my time series ggplot. But I don't know how to highlight all.
I have this code:
library(ggplot2)
library(dplyr)
highlight_max <- canteen_menu_data %>%
filter(date == c("2016-10-04","2017-09-27"))
highlight_min <- canteen_menu_data %>%
filter(date == c("2016-12-27","2017-07-28"))
highlight_christmas2016 <- canteen_menu_data %>%
filter(date == c("2016-12-21","2016-12-30"))
highlight_christmas2017 <- canteen_menu_data %>%
filter(date == c("2017-12-18","2017-12-21"))
dput(canteen_menu_data) %>%
ggplot(aes(x=date,y=sales)) +
geom_line(alpha=0.3) +
geom_point(data=highlight_max, aes(x=date,y=sales), color='red',size=3) +
geom_point(data=highlight_min, aes(x=date,y=sales), color='red',size=3) +
geom_point(data=highlight_christmas2016, aes(x=date,y=sales), color='darkred',size=1) +
geom_point(data=highlight_christmas2017, aes(x=date,y=sales), color='darkred',size=1)
When I run this, all the point are highlighted in my plot but the last line doesn't do anything as you can see in the picture
Can you please help me?