breaks_trans: Breaks trans

View source: R/scale_breaks.R

breaks_transR Documentation

Breaks trans

Description

Generate a breaks vector of size n with evenly spaced breaks in trans domain.

Usage

breaks_trans(n = 10, trans)

Arguments

n

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

trans

<scales::trans> an invertible transformer.

Details

Breaks are generated by transforming the input range to trans domain, generating a regular sequence of size n for the transformed range, then inverting the transform.

The input range must be finite for both the input domain and the trans domain. If input is not finite, an empty vector is returned.

See Also

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

Examples

breaks_trans(trans = scales::identity_trans())(-10:10)
breaks_trans(trans = symlog_trans())(-10:10)
breaks_trans(trans = power_trans())(-10:10)
breaks_manual(c(-10, 0, 10))(-10:10)
breaks_manual(-1:1 * 1e6)(NULL)


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