setVennOpts: Set graphical parameters of an nVenn object diagram.

View source: R/nVenn2.R

setVennOptsR Documentation

Set graphical parameters of an nVenn object diagram.

Description

The function returns an object whose parameters will change the way the diagram is plotted.

Usage

setVennOpts(
  nVennObj,
  opacity = 0.4,
  fontSize = 12,
  lineWidth = 1,
  palette = 0,
  showRegions = TRUE,
  showWeights = TRUE,
  plot = TRUE
)

Arguments

nVennObj

nVenn object generated with nVennDiagram().

opacity

Opacity of sets, between 0 (completely transparent) and 1 (completely opaque). Defaults to 0.4.

fontSize

Size of the font for the numbers of elements (weights) in each region. It also indirectly controls the font sizes of the region descriptions, if shown (showRegions=TRUE). Defaults to 10.

lineWidth

Width of the lines defining each set. The value will be rounded to the closest integer. Defaults to 1.

palette

Color palette to use to fill the sets. Integer from 0 to 3. Defaults to 0.

showRegions

If true (default), show region descriptions.

showWeights

If true (default), show number of elements in each region.

plot

If true (default), plots the diagram after the operation.

Value

nVennObj with graphical options set.

Examples

myv <- nVennDiagram(exampledf)
myv <- setVennOpts(myv, showRegions=FALSE, opacity=0.2, lineWidth=2)

nVennR2 documentation built on July 14, 2026, 1:09 a.m.