matplotlib-venn icon indicating copy to clipboard operation
matplotlib-venn copied to clipboard

Add Venn Areas graphic

Open Sieboldianus opened this issue 5 years ago • 0 comments

First of all, many thanks for this awesome package!

Not knowing Venn Diagrams and having little math background, I was first confused by the syntax (Abc, aBc, ABc, abC, AbC, aBC, ABC) - looking at Inclusion–exclusion principle I thought e.g. aBc meant |B|.

Anyway, what would really help would be to add a graphic to illustrate these areas. I created the following with the help of matplotlib-venn:

venn

v = venn3(
    subsets=(
        500,
        500, 
        100,
        500,
        100,
        100,
        10),
    set_labels = ('A', 'B', 'C'))
v.get_label_by_id('100').set_text('Abc')
v.get_label_by_id('010').set_text('aBc')
v.get_label_by_id('001').set_text('abC')
v.get_label_by_id('110').set_text('ABc')
v.get_label_by_id('101').set_text('AbC')
v.get_label_by_id('011').set_text('aBC')
v.get_label_by_id('111').set_text('ABC')
plt.show()

Perhaps this could be added to the README.md?

Sieboldianus avatar Jul 19 '20 11:07 Sieboldianus