This produces a scale that is measured in days as with ggplot2::scale_x_date, however it will snap breaks and limits to week boundaries so that things work as intended when binning by week.
Arguments
- name, labels, date_labels, oob, limits, ...
- week_breaks, week_minor_breaks
frequency of breaks in number of weeks (e.g.
2
for fortnightly breaks).- week_start
Day the week begins (defaults to Monday). Can be specified as a case-insensitive English weekday name such as "Monday" or an integer. Since you generally won't want to mix definitions, it is more convenient to control this globally with the
"phylepic.week_start"
option, e.g.options(phylepic.week_start = "Monday")
.