I am plotting race time data with seconds on the Y-Axis and Date on the X-Axis. However, I would like to convert the Y-Axis labels to minute:seconds format without changing the numeric nature of the data. I used the following code to create my ggplot:
plotab2 = ggplot(AB1000, aes(Date, secs)) +
geom_point(size=3, colour= "darkred" ) +
geom_line(size=0.5, colour = "darkred") +
ylim(77,87) +
geom_hline(yintercept = hline1000 ,size =0.4,linetype="dashed", colour="darkblue") +
labs(x = "Date", y = "Time (s)", title="1000m") +
Presentation_Theme
And attempted to edit the Y-Axis labels with the following:
plotab2 + scale_y_continuous(breaks=c(77.5,80.0,82.5,85.0,87.5),
labels=c("1:17.5", "1:20.00", "1:22.50", "1:25.00", "1:27.5"))
Curiously, the resulting plot did work (sort of), and returned only the 1:20.00 label. Hoping for some help in getting the other values to show