This function can be used to modify the breaks of a ggplot2 scale. It is specifically designed to remove the some breaks in the scale.
Usage
ggeo_remove_breaks(original_func, remove_list = list())
Arguments
- original_func
The function to create the breaks. Use the break functions from the scales
- remove_list
The values to remove from the scale.
Examples
ggplot2::ggplot(ggplot2::aes(x = speed, y = dist), data = cars) +
ggplot2::geom_point() +
ggplot2::labs(title = "Fast cars!") +
ggplot2::scale_y_continuous(
breaks = ggeo::ggeo_remove_breaks(scales::breaks_pretty(6), list(0)),
)