Sys.setlocale("LC_TIME", "English") # use this to get english names on x axis
ggplot(dataSubset, aes(x=Timestamp, y=VALUE)) + geom_point() +
xlab("Time") + ylab("Light (lux)") + ggtitle("Light in the office") +
scale_x_datetime(date_breaks="1 day", # major breaks (these will have labels)
date_minor_breaks = "1 day", # minor breaks (this will be what the plot y lines are divided in)
date_labels = "%a")
# One break and label per hour:
scale_x_datetime(labels = date_format("%H:%M"),
date_breaks = "1 hour")
# Only time, 1 major break every two hours:
scale_x_time(breaks=hms(hours((1:11)*2))) +