gaospecial / ggVennDiagram

A 'ggplot2' implement of Venn Diagram.
https://gaospecial.github.io/ggVennDiagram/
GNU General Public License v3.0
282 stars 38 forks source link

Can we change the way to calculate percentage in ggVennDiagram ? #41

Closed sbenjamaporn closed 2 years ago

sbenjamaporn commented 2 years ago

Thanks for a wonderful tool!

I have a question about percentage calculation in ggVennDiagram. Your package calculates it based on (n/total 100), right ?. According to my data, my total of each group is dramatically unequl (A = 10000, B=2000, C=500). I would like to reduce the imbalance of them by calculating the percentage following these, A=((n of A /10000) 100) B=((n of B /2000) 100) C=((n of C /500) 100) A∩B=((n of A∩B /12000) 100) A∩C=((n of A∩C /10500) 100) B∩C=((n of B∩C /2500) 100) A∩B∩C=((n of A∩B∩C /12500) 100)

Is it possible to do these ? or it is wrong to calculate it because of mathematical theory ?

gaospecial commented 2 years ago

If you want to control element, you need to perform step-wise self-definition, refer to https://gaospecial.github.io/ggVennDiagram/articles/fully-customed.html.

However, if I were you, I would like to export this graph to PPT using export::graph2ppt() to do further modification in PowerPoint (or PDF with AI).