Compute breaks, labels, minor breaks, and axis_range for a scale
Source:R/scale.R
dot-compute_scale_breaks.RdGiven a scale (continuous / genomic / discrete) and the raw data
range, returns a list with the full axis-drawing metadata: breaks,
labels, minor_breaks, axis_range (where the axis line should
span, governed by cap), plot_range (the expanded visible range),
and data_range.
Arguments
- scale
A
SeqPositionScale.- data_range
Length-2 numeric vector of the unexpanded data range. For genomic scales, this is the window range.
- plot_range
Optional pre-expanded plot range. When
NULL(default), computed fromdata_rangevia.expand_limits()usingscale$expand.
Details
Algorithm ported from THEfunc's make_axis_meta(); uses base
pretty() instead of scales::pretty_breaks() so no new dependency
is introduced.