Learn R Programming

broman (version 0.59-5)

venn: 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.

Value

  • None.

Details

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

Examples

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

Run the code above in your browser using DataLab