% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/polyclip.R
\name{highlight}
\alias{highlight}
\title{Draw polygons to highlight subsets}
\usage{
highlight(
  venn,
  setops,
  color = "transparent",
  linewidth = 1.5,
  linetype = "solid",
  fill = "black",
  alpha = 0.4,
  ...
)
}
\arguments{
\item{venn}{Venn diagram produced from \code{venny::venny()}.}

\item{setops}{The result of set operations.}

\item{color}{Character (default: "transparent"). The polygon line color.}

\item{linewidth}{Numeric (default: 1.5). The polygon linewidth.}

\item{linetype}{Character (default: "solid"). The polygon linetype.}

\item{fill}{Character (default: "black"). The polygon color.}

\item{alpha}{Numeric (default: 0.4). The polygon transparency (0-1).}

\item{...}{The other arguments passed into \code{ggplot2::geom_polygon}.}
}
\value{
A ggplot object.
}
\description{
A handy wrapper for the \code{ggplot2::geom_polygon()} used to represent the
result of set operations.
}
\examples{
data <- list(
    Set_A = c(10:100, 500:600),
    Set_B = c(5:150, 550:650),
    Set_C = c(80:180, 580:680),
    Set_D = c(120:220, 520:620)
)
out <- venny(data, detail = TRUE)
p0 <- out$venn
ep <- out$ellipse_path
res <- intersect(ep$Set_A, ep$Set_B, ep$Set_D)
highlight(p0, res)
}
