Format a number nicely, removing trailing zeros.
Format a set of break values together: like format_number (integers
verbatim, otherwise up to 2 decimals, trailing zeros trimmed), but with as
many extra decimals as needed so that distinct breaks get distinct labels
and no non-zero break prints as “0” — e.g. breaks 0.990/0.992/0.994 read
“0.99, 0.992, 0.994” instead of “0.99, 0.99, 0.99”, and a log tick at 0.001
no longer reads “0”. Output is unchanged whenever 2 decimals suffice.
format_numbers rendered with the marks of locale: the same number of
decimals is chosen (so distinct breaks keep distinct labels), then the
labels get the locale’s decimal mark and thousands grouping —
[1000, 1500] reads "1.000", "1.500" in de-DE.
Round ticks for a log-transformed axis, matching R’s scales::log_breaks():
prefers base^n; when the range spans too few decades for m ticks, mixes
in evenly-spaced sub-multiples of base (e.g. {1,2,5} * 10^n for base 10);
falls back to extended_breaks over the data range [dmin, dmax] when
neither gives enough ticks. dmin/dmax are in data (pre-transform) space
and must be finite and positive.
Evenly spaced break values start, start+step, … up to end (inclusive,
with a small tolerance). Index-driven and capped, so it terminates even when
step is below the floating-point resolution of start (where repeated
v += step would never advance).