easy_remove_gridlines {ggeasy} | R Documentation |
Easily remove gridlines
Description
Easily remove any gridlines from a ggplot
.
Usage
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)
Arguments
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 |
Value
a theme
object which can be used in
ggplot2
calls
Author(s)
Thomas Neitmann
Examples
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()
[Package ggeasy version 0.1.4 Index]