integer_breaks: Create integer breaks for ggplot2 axes

View source: R/integer_breaks.R

integer_breaksR Documentation

Create integer breaks for ggplot2 axes

Description

See https://stackoverflow.com/a/62321155

Usage

integer_breaks(n = 5, ...)

Arguments

n

The number of breaks

...

extra parameters passes to pretty

Examples

data(mtcars)
ggplot(mtcars[mtcars$wt > 3, ], aes(x = cyl, y = wt)) +
 geom_point() +
 scale_y_continuous(breaks = integer_breaks())

ChandlerLutz/CLmisc documentation built on Dec. 2, 2022, 12:40 p.m.