Basic Venn diagram with 3 groups

logo of a chart:Venn

This post provides a reproducible code to create a basic venn diagram with 3 groups using matplotlib library.

You can draw a basic venn diagram of 3 groups using the venn3() function of matplotlib. subsets parameter takes the values of each groups and their intersections.

# Import the library
import matplotlib.pyplot as plt
from matplotlib_venn import venn3
 
# Make the diagram
venn3(subsets = (10, 8, 22, 6,9,4,2))
plt.show()

🚨 Grab the Data To Viz poster!


Do you know all the chart types? Do you know which one you should pick? I made a decision tree that answers those questions. You can download it for free!

    dataviz decision tree poster