Very likely the cause of your problem is the missing "+" symbol after the labs()
command
average_holds_June %>%
mutate(time = as.POSIXct(hms::parse_hm(time))) %>%
ggplot(aes(time, avg_holds, color=year)) +
geom_point() +
geom_line() +
scale_x_datetime(date_breaks ="1 hour",date_labels = "%H:%M")+
labs(title= "Average number of calls with excessive hold times") +
theme_classic()
If this doesn't solve your problem, please provide a REPRoducible EXample (reprex) ilustrating your issue.