| easy_remove_gridlines | R Documentation |
Easily remove any gridlines from a ggplot.
easy_remove_gridlines(
axis = c("both", "x", "y"),
minor = TRUE,
major = TRUE,
teach = FALSE
)
easy_remove_x_gridlines(minor = TRUE, major = TRUE, teach = FALSE)
easy_remove_y_gridlines(minor = TRUE, major = TRUE, teach = FALSE)
axis |
From which axis should grid lines be removed? By default |
minor |
Should minor grid lines be removed? By default |
major |
Should major grid lines be removed? By default |
teach |
Should the equivalent |
a theme object which can be used in
ggplot2 calls
Thomas Neitmann
library(ggplot2) p <- ggplot(mtcars, aes(hp, mpg)) # remove all grid lines at once p + easy_remove_gridlines() # remove all minor grid lines p + easy_remove_gridlines(major = FALSE) # remove all major grid lines p + easy_remove_gridlines(minor = FALSE) # remove x gridlines p + easy_remove_x_gridlines() # or p + easy_remove_gridlines(axis = "x") # remove y gridlines p + easy_remove_y_gridlines()