Add a date scale and custom formatting for creating consistent timeseries plots.
custom_datetimeScale( startdate = NULL, enddate = NULL, timezone = NULL, expand = c(0, 0.05), break_width = NULL, minor_break_width = NULL, date_labels = "%b %d", tick_location = c("midnight", "midday"), includeFullEnddate = TRUE, today_label = TRUE, ... )
startdate | Desired start date (integer or character in ymd format or POSIXct). |
---|---|
enddate | Desired end date (integer or character in ymd format or POSIXct). |
timezone | Timezone for label formatting. |
expand | Vector of range expansion constants used to add some padding around the data, to ensure that they are placed some distance away from the axes. |
break_width | Space between breaks. If |
minor_break_width | Space between minor breaks. If |
date_labels | date format string for formatting date labels. |
tick_location | Location of ticks ("midnight" or "midday") |
includeFullEnddate | if |
today_label | if |
... | Additional arguments passed onto
|
break_width
and minor_break_width
can be specified in several
ways.
A number, taken to be in days
An object of class difftime
A character string, containing one of "day"
, "week"
,
"month"
, "quarter"
or "year"
. This can
optionally be preceded by a (positive or negative) integer and a
space or followed by "s"
. For example: "3 weeks"
.