konstantint / matplotlib-venn

Area-weighted venn-diagrams for Python/matplotlib
MIT License
520 stars 68 forks source link

Improve how layout algorithm handles blank overlaps for 3+ sets #79

Closed EarthToMooney closed 7 months ago

EarthToMooney commented 7 months ago

When a third set is added that's a combination of subsets from 2 other sets, it results in an empty section with a label of 0 for the third set: imageIf there was an option to remove this empty space, or to add 4 or more sets, it would resolve this issue.

konstantint commented 7 months ago

The existence of an empty section is an inevitable consequence of three circles being unable to perfectly represent any combination of 7 area sizes.

You can manually hide it, though:

v = venn3(...)
v.get_patch_by_id('001').set_visible(False)
v.get_label_by_id('001').set_visible(False)