ggvenn: Draw the Venn diagram.

Description Usage Arguments Details Value Examples

Description

Draw the Venn diagram for 2 or 3 sets.

Usage

1
2
3
4
## S4 method for signature 'Venn'
ggvenn(venn = "Venn", slice = "all",
  fill = c("gold", "dodgerblue3", "deeppink"), alpha = 0.5,
  thickness = 1.5)

Arguments

venn

(Required) A Venn object.

slice

(Optional) The names or the indices of the sets of interest. Default is "all", which is for the cases the Venn object only contains 2 or 3 sets. If you have 4 or more sets, this argument is required.

fill

(Optional) Fill color of the sets.

alpha

(Optional) Opacity of the fill colors. Default is 0.5 in the range of (0, 0.5).

thickness

(Optional) Stroke size of the sets.

Details

This function is based on the packages 'ggplot2' and 'ggforce.' It has been designed for 2 or 3 sets because Venn diagrams are terrible for showing the interactions of 4 or more sets. If you need to visualize such interactions, consider using setmap.

Value

The function returns the plot in ggplot2 style.

Examples

1
2
3
venn = Venn(list(letters[1:10], letters[3:12], letters[6:15]))
ggvenn(venn)
ggvenn(venn, slice = c(1, 2), thickness = 0, alpha = 0.3)

Example output



RVenn documentation built on July 19, 2019, 1:02 a.m.