Skip to contents

breaks function to encourage integer-valued breaks, based on input from pretty

Usage

integer_breaks(n = 5, ...)

Arguments

n

number of breaks (default = 5)

...

Additional arguments passed to the pretty() function

Value

a function for generating integer-valued breaks on a continuous scale

Details

Code from here: https://joshuacook.netlify.app/post/integer-values-ggplot-axis/