How can a Proportional Venn Diagram be created in R?

A Proportional Venn Diagram in R can be created by first importing the necessary packages, such as “VennDiagram” and “limma”. Then, the data or sets to be visualized should be organized into a list or data frame. The “draw.pairwise.venn” function from the “VennDiagram” package can then be used to generate the diagram, with options to customize the colors, labels, and proportions of each set. The “limma” package can also be used to calculate and display the significance of the overlap between the sets. Overall, a Proportional Venn Diagram in R can effectively visualize the relationships and proportions between multiple sets of data.


A Venn diagram is a diagram that uses overlapping circles to show the relationship between two groups.

A proportional Venn diagram is a specific type of Venn diagram in which the size of the circles represent the sample size of each group.

The easiest way to create a proportional Venn diagram in R is by using the plot function from the eulerr package.

The following example shows how to do so in practice.

Example: How to Create a Proportional Venn Diagram in R

Suppose we have two groups with the following values:

  • A: 100
  • B: 500
  • A & B Overlap: 75

To create a proportional Venn diagram to visualize the relationship between these two groups, we can use the following code:

library(eulerr)

#specify values to use in venn diagram
fit <- euler(c('A' = 100, 'B' = 500, 'A&B' = 75))

#create venn diagram
plot(fit) 

Notice that the sizes of the circles in the Venn diagram are representative of the values that we specified.

If you would like to customize the colors used in the Venn diagram, you can use the fill argument to do so:

library(eulerr)

#specify values to use in venn diagram
fit <- euler(c('A' = 100, 'B' = 500, 'A&B' = 75))

#create venn diagram with custom colors
plot(fit, fill=c('coral2', 'steelblue')) 

proportional Venn diagram in R

The A circle now has a coral2 fill and the B circle now has a steelblue fill, just as we specified using the fill argument in the plot function.

Note: Refer to for a complete introduction to the eulerr package in R.

Additional Resources

How to Create a Grouped Boxplot in R Using ggplot2
How to Create a Heatmap in R Using ggplot2
How to Create a Gantt Chart in R Using ggplot2

x