breaks_log: Breaks log

View source: R/scale_breaks.R

breaks_logR Documentation

Breaks log

Description

Generate a breaks vector of size n with log log_trans spaced breaks.

Usage

breaks_log(n = 10, base = exp(1))

Arguments

n

<int> the size of the output vector. Ouput size will be at least length-2 for finite input.

base

<number> The log base

Details

Input range must be finite and either be strictly negative or strictly positive; it must not cross, nor include 0.

If input range is non-finite, an empty vector is returned.

Note

This function has a different goal to scales::breaks_log: it produces evenly spaced log-breaks for use with d3-scale, it doesn't produce breaks with pretty labels.

See Also

Other breaks: breaks_linear(), breaks_manual(), breaks_power(), breaks_symlog(), breaks_trans()

Examples

breaks_log(5)(-10:-1)
breaks_log(5)(1:10)


anthonynorth/rdeck documentation built on Aug. 11, 2024, 1:40 p.m.