Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from matplotlib_venn import venn3
- from matplotlib import pyplot as plt
- from collections import Counter
- set1 = set(['A', 'B', 'C', 'D'])
- set2 = set(['B', 'C', 'D', 'E'])
- set3 = set(['C', 'D',' E', 'F', 'G'])
- union = set1.union(set2).union(set3)
- indicators = ['%d%d%d' % (a in set1, a in set2, a in set3) for a in union]
- subsets = Counter(indicators)
- test = venn3(subsets, ('Set1', 'Set2', 'Set3'))
- plt.plot(test)
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment