Closed
Description
Looking at the example below the first plot produces an output that looks perfectly fine. However when plotting only one point as in the second plot, the date time value on the x-axis is set to the number of seconds, so only a value of 50 is displayed.
I know this can be fixed manually by setting date_labels in scale_x_datetime. However I think a more sensible default would be nice.
library(ggplot2)
library(lubridate)
dat <- data.frame(x = as_datetime(c("2010-08-03 00:50:50",
"2010-08-04 00:50:50")), y = 1)
ggplot(dat, aes(x = x, y = y)) + geom_point()
ggplot(dat[1, ], aes(x = x, y = y)) + geom_point()