If you are building a histogram of binned values, you want to have labels for your bins that correspond to the ranges you used to bin. This function takes the breakpoints that define your bins and produces nice-looking labels for your histogram plot.
labelCuts(
breakPoints,
round_digits = 1,
signif_digits = 3,
collapse = "-",
infBins = FALSE
)
The exact values you want as boundaries for your bins
Number of digits to cut round labels to.
Number of significant digits to specify.
Character to separate the labels
use >/< as labels on the edge bins
A vector of histogram axis labels.
labelCuts
will take a cut group, (e.g., a quantile division of
some signal), and give you clean labels (similar to the cut method).