Learn R Programming

scales (version 1.4.0)

breaks_exp: Breaks for exponentially transformed data

Description

This breaks function typically labels zero and the last n - 1 integers of a range if that range is large enough (currently: 3). For smaller ranges, it uses breaks_extended().

Usage

breaks_exp(n = 5, ...)

Value

All breaks_() functions return a function for generating breaks. These functions takes, as their first argument a vector of values that represent the data range to provide breaks for. Some will optionally take a second argument that allows you to specify the number of breaks to recieve.

Arguments

n

Desired number of breaks. You may get slightly more or fewer breaks that requested.

...

other arguments passed on to labeling::extended()

Examples

Run this code
# Small range
demo_continuous(c(100, 102), transform = "exp", breaks = breaks_exp())
# Large range
demo_continuous(c(0, 100), transform = "exp", breaks = breaks_exp(n = 4))

Run the code above in your browser using DataLab