Creates a numeric position scale for axes displaying continuous data.
Arguments
- limits
Optional numeric vector of length 2 clamping the axis range. If
NULL, the range is auto-computed from element data.- n_breaks
Target number of pretty breaks (default 5). Ignored when
breaksis supplied.- breaks
Optional numeric vector of explicit break positions.
- minor_breaks
Optional scalar (number of sub-divisions between major breaks) or numeric vector of explicit minor-break positions.
- expand
Length-2
c(mul, add)specifying padding around the data range.mulis multiplied bydiff(data_range);addis added in data units. Defaultc(0.025, 0)— a 2.5% breath.- cap
One of
"capped"(default — axis line spans the break range, so tick labels don't look stranded),"full"(spans the expanded plot range),"exact"(spans the unexpanded data range), or"ticks"(suppress the axis line entirely).- labels
Optional character vector of tick labels (same length as
breaks). WhenNULL, breaks are formatted automatically.