How to define custom format for time variable axis in ggplot2?
DF <- data.frame(TIME = c(350,400,250,650,500,750),
CATEGORY = c(1:6))
ggplot(data=DF, aes(x=CATEGORY, y=as_datetime(TIME))) +
geom_col() +
scale_y_datetime(labels = date_format("%M:%S"))
What I want is to remove leading zero at the minute-part. Something like this:
Thanks for your time & effort!


