Add a date scale and custom formatting for creating consistent timeseries plots.
Desired start date (integer or character in ymd format or POSIXct).
Desired end date (integer or character in ymd format or POSIXct).
Timezone for label formatting.
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.
Space between breaks. If NULL
, suitable breaks are
calculated based on the data. See 'Details'.
Space between minor breaks. If NULL
, suitable
breaks are calculated based on the data. See 'Details'.
date format string for formatting date labels.
Location of ticks ("midnight" or "midday")
if TRUE
, the x-axis limit is pushed up to
include the full final day.
if FALSE
, no label will be generated for today.
Additional arguments passed onto
scale_x_datetime
.
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"
.