| setVennColors | R Documentation |
Change set colors
setVennColors(nVennObj, colorList, plot = TRUE)
nVennObj |
nVenn object created with |
colorList |
Vector or list of colors for the sets (see Details). |
plot |
If true (default), plots the diagram after setting the colors. |
If a vector of svg-formatted colors is provided, they will be used in the same
order. This is a good way to create and use a custom color palette.
If a list is used, the function will call setVennColor() with the names
in the list.
It is important to notice that each color must be
a valid color in SVG format. The value is not checked, and therefore an
incorrect value may break the plot in plotVenn() or lead to unexpected
results.
nVenn object with changed set colors.
myv <- nVennDiagram(list(Set1=c("a", "b", "c"), Set2=c("a", "c", "d")), verbose=FALSE)
mypalette <- c("black", "#ffff00", "red")
myv <- setVennColors(myv, mypalette)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.