limit_breaks | R Documentation |
Truncate log-scaled axis breaks to data range
limit_breaks(v, n = 5, splits = 1, base = exp(1))
v |
Numeric vector, data or data range |
n |
Scalar, target number of breaks |
splits |
Integer, one of |
base |
a positive or complex number: the base with respect to which
logarithms are computed. Defaults to |
Vector of numeric values for axis breaks
Other breaking:
breaks_divMult()
,
limitimil()
,
split_decades()
dat <- exp(seq(-2,5,0.2))
v <- log(dat) # data or data range
n <- 5
# axisTicks returns values way beyond data
grDevices::axisTicks(nint = n, log = TRUE, usr = range(v))
# limit_breaks reels this in
limit_breaks(v = v, n = n)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.