visualize_5_1.py 606 B

123456789101112
  1. def venn(vennset=(1,1,1,1,1,1,1), venncolor=('#00909e', '#f67280', '#ff971d'), vennalpha=0.5,
  2. vennlabel=('A', 'B', 'C')):
  3. fig = plt.figure()
  4. if len(vennset) == 7:
  5. venn3(subsets=vennset, set_labels=vennlabel, set_colors=venncolor, alpha=vennalpha)
  6. plt.savefig('venn3.png', format='png', bbox_inches='tight', dpi=300)
  7. elif len(vennset) == 3:
  8. venn2(subsets=vennset, set_labels=vennlabel, set_colors=venncolor, alpha=vennalpha)
  9. plt.savefig('venn2.png', format='png', bbox_inches='tight', dpi=300)
  10. else:
  11. print("Error: check the set dataset")