MD Abid Hasan
MD Abid Hasan

Reputation: 361

Non-proportional venn diagram in python

Is it possible to draw 3 set non-proportional Venn diagram with python? Right now I'm using matplotlib-venn to draw 3 circles Venn diagram. But some of the intersection values are very small compared to others. So those sections are almost not visible.

This is the code:

set1 = set(list1)
set2 = set(list2)
set3 = set(list3)
v = venn3([set1, set2, set3], set_labels = ("set1", "set2", "set3"))
plt.title("title")
plt.show()

Upvotes: 1

Views: 1655

Answers (1)

KT.
KT.

Reputation: 11440

There is a method called venn3_unweighted, which lets you either use no area-weighting at all, or redefine the actual subset sizes used to compute the diagram independently of the numbers shown (thus forcefully increasing the size of the smallest parts).

venn3_unweighted([set1, set2, set3], 
                 set_labels=("set1", "set2", "set3"),
                 subset_areas=(... seven numbers defining the sizes ...))

Upvotes: 4

Related Questions