konstantint / matplotlib-venn

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

Missing subsets for venn3 #66

Closed sujunhao closed 3 years ago

sujunhao commented 3 years ago

Hi, thanks for developing this useful tool. I confronted an issue when I am using this package to plot a venn3 plot. As shown below, The subsets for "152" are missing from the plot, and I tried to increase the plot size, the subsets remain missing.

venn3(subsets = (58822, 276454, 50265, 152, 223, 29, 10830), set_labels = ('FP', 'FN', 'MCV'), alpha = 0.5);

image

I wonder it is a bug or I miss something? Thanks for any help in advance!

Best, JH

konstantint commented 3 years ago

See this comment.

With very large differences in sizes of areas some of them may not get a chance to be represented. The practical way out is to manually "pull" the smaller region sizes to be a bit larger:

from matplotlib_venn import venn3_unweighted
venn3_unweighted(subsets = (58822, 276454, 50265, 152, 223, 29, 10830),
      set_labels = ('FP', 'FN', 'MCV'), alpha = 0.5,
      subset_areas = (58822, 276454, 50265, 152 + 1000, 223, 29, 10830));
konstantint commented 3 years ago

Duplicate of #30

sujunhao commented 3 years ago

I see. Many thanks for your help!