This helper caches the output of a breaks function (such as
scales::breaks_width()
). This means that the first time the breaks are
computed with the helper, the resulting breaks vector will be stored.
All subsequent invocations of the helper will return the same stored breaks,
regardless of the limits provided.
Arguments
- breaks
A function that takes the limits as input and returns breaks as output. See
ggplot2::continuous_scale
for details.