% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geoms-base.R
\name{geom_polygon}
\alias{geom_polygon}
\title{Polygons}
\usage{
geom_polygon(
  mapping = NULL,
  data = NULL,
  color = NULL,
  alpha = NULL,
  linewidth = NULL,
  border = NULL
)
}
\arguments{
\item{mapping, data}{Standard layer overrides.}

\item{color}{Fill colour when \code{color} is not mapped.}

\item{alpha}{Fill opacity.}

\item{linewidth}{Outline width in px; \code{0} (default) draws no outline.}

\item{border}{Outline colour when \code{linewidth > 0}.}
}
\value{
A \link{Layer} to add with \code{+}.
}
\description{
Joins the points of each group into a closed shape, in data order. Map
\code{group} when the data holds several polygons.
}
\examples{
d <- data.frame(x = c(1, 3, 2), y = c(1, 1, 3))
ggnext(d, aes(x, y)) + geom_polygon()
}
