labeling package. — extended_breaks" />

Extended breaks. Uses Wilkinson's extended breaks algorithm as implemented in the labeling package.

extended_breaks(n = 5, ...)

Arguments

n

desired number of breaks

...

other arguments passed on to labeling::extended()

References

Talbot, J., Lin, S., Hanrahan, P. (2010) An Extension of Wilkinson's Algorithm for Positioning Tick Labels on Axes, InfoVis 2010.

Examples

extended_breaks()(1:10)
#> [1] 0.0 2.5 5.0 7.5 10.0
extended_breaks()(1:100)
#> [1] 0 25 50 75 100