% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nVenn2.R
\name{setVennPalette}
\alias{setVennPalette}
\title{Change the color palette for a diagram}
\usage{
setVennPalette(nVennObj, palette = 0, plot = TRUE)
}
\arguments{
\item{nVennObj}{nVenn object created with \code{\link[=nVennDiagram]{nVennDiagram()}}.}

\item{palette}{Either 0 (default), 1, 2 or 3. Each number defines a
color palette that will be applied to the results}

\item{plot}{If true (default), plots the diagram after applying the palette.}
}
\value{
nVenn object with the palette set to the requested value.
}
\description{
Change the color palette for a diagram
}
\details{
The color palette for a diagram can also be set with \code{\link[=setVennOpts]{setVennOpts()}}, but
with a small difference. If a set color has been set with \code{\link[=setVennColor]{setVennColor()}},
\code{\link[=setVennPalette]{setVennPalette()}} will override and delete that setting, while \code{\link[=setVennOpts]{setVennOpts()}}
will not. This way, one can have a color defined for a set and change the
colors of the rest of sets with \code{\link[=setVennOpts]{setVennOpts()}} or reset every color to the
pre-defined palette with \code{\link[=setVennPalette]{setVennPalette()}}.
}
\examples{
myv <- nVennDiagram(list(Set1=c("a", "b", "c"), Set2=c("a", "c", "d")), verbose=FALSE)
myv <- setVennPalette(myv, 2)
myv <- setVennPalette(myv, 3)
}
\seealso{
\code{\link[=setVennOpts]{setVennOpts()}} for an alternative way to change the color palette.
}
