I am using the matplotlib_venn.venn2 function to plot four different Venn diagrams in a single figure.
My inputs for the function's subset arguments are sets of strings:
cse_set_ucb = set(['data science','algorithms', 'machine learning',...])
ece_set_ucb = set(['circuits', 'signals', 'machine learning',....])
v_ucb = venn2([cse_set_ucb,ece_set_ucb],set_labels=['CSE','ECE'],set_colors=['r','g'])
and similarly for v_ucla, v_ucsb, and v_ucsd.
Current Result:
However, to make the comparison more intuitive, I wanted to show the percentages inside the Venn diagram rather than the set sizes. Is it possible to do so by some functionality in venn2?
For e.g the first plot would be replaced with:
The only alternative I can think of now is to do the normalization myself somehow and then feed the subset sizes into the venn2 function, rather than the sets, but I was hoping for a smarter way to do this
There's an argument subset_label_formatter which control labels printed using a function.
Ref:
1)Percentages in venn diagrams
2)Add parameter to allow formatting of labels of subset sizes