| setVennPalette | R Documentation |
Change the color palette for a diagram
setVennPalette(nVennObj, palette = 0, plot = TRUE)
nVennObj |
nVenn object created with |
palette |
Either 0 (default), 1, 2 or 3. Each number defines a color palette that will be applied to the results |
plot |
If true (default), plots the diagram after applying the palette. |
The color palette for a diagram can also be set with setVennOpts(), but
with a small difference. If a set color has been set with setVennColor(),
setVennPalette() will override and delete that setting, while setVennOpts()
will not. This way, one can have a color defined for a set and change the
colors of the rest of sets with setVennOpts() or reset every color to the
pre-defined palette with setVennPalette().
nVenn object with the palette set to the requested value.
setVennOpts() for an alternative way to change the color palette.
myv <- nVennDiagram(list(Set1=c("a", "b", "c"), Set2=c("a", "c", "d")), verbose=FALSE)
myv <- setVennPalette(myv, 2)
myv <- setVennPalette(myv, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.