scale_x_integer() and scale_y_integer() are convenience wrappers around
ggplot2::scale_x_continuous() and ggplot2::scale_y_continuous() that
prefer clean integer breaks (for example avoiding 2.5-step breaks on ranges
around 10).
Arguments
- n_breaks
Approximate number of integer-preferred breaks, passed to
base::pretty()asn.- ...
Named arguments passed through to
ggplot2::scale_x_continuous()orggplot2::scale_y_continuous(), exceptbreaks.Breaks are generated using
floor(pretty(x, n_breaks)). If you need to supplybreaksdirectly, useggplot2::scale_x_continuous()orggplot2::scale_y_continuous()instead.