% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/major_grid.R
\name{major_grid}
\alias{major_grid}
\title{Set major grid lines on a ggplot}
\usage{
major_grid(
  plot,
  grid_major = TRUE,
  grid_major_colour = "grey80",
  grid_major_linetype = 2,
  grid_major_linewidth = 0.3
)
}
\arguments{
\item{plot}{A ggplot object.}

\item{grid_major}{Whether to show major grid lines. Default is \code{TRUE}.}

\item{grid_major_colour}{Grid line colour. Default is \code{"grey80"}.}

\item{grid_major_linetype}{Grid line type. Default is \code{2} (dashed).}

\item{grid_major_linewidth}{Grid line width. Default is \code{0.3}.}
}
\value{
A ggplot object with modified \code{panel.grid.major} theme element.
}
\description{
Add or remove major grid lines from a ggplot object.
}
\examples{
library(ggplot2)
p <- ggplot(mtcars, aes(wt, mpg)) + geom_point()
major_grid(p, grid_major = TRUE)
}
