venn: Plot to-scale Venn diagram

View source: R/venn_diagram.R

vennR Documentation

Plot to-scale Venn diagram

Description

Plot a Venn diagram (with two groups), to scale, either with circles or with squares.

Usage

venn(
  setA = 50,
  setB = 50,
  both = 25,
  method = c("circle", "square"),
  labels = c("A", "B"),
  col = c("blue", "red")
)

Arguments

setA

Total area of set A.

setB

Total area of set B.

both

Area of intersection of sets A and B.

method

Indicates whether to plot circles or squares.

labels

Labels for the two sets. (NULL for no labels.)

col

Colors of the two sets.

Details

Plots a to-scale Venn diagram with two sets, so that the relative areas of the two sets and their intersection are exact.

Value

None.

Examples

venn(setA=86, setB=1622, both=10)
venn(setA=86, setB=1622, both=10, method="square")


broman documentation built on July 8, 2022, 5:07 p.m.

Related to venn in broman...