venneuler in R not drawing to proportion
3
1
Entering edit mode
6.8 years ago
ildem ▴ 60

Hi, I have been trying to draw a proportional venn diagram in R. I find that it is in no way proportional, it doesnt even reflect the truth. These are not my numbers but say they were: vd <- venneuler(c(A=10, B=6, "A&B"=6)) plot(vd) This, in theory, should draw B that is covered by A (since the overlap is 6, and the size of B is 6). This is not the case. It draws two sets A and B with a large overlap, but not a complete overlap.

What am I doing wrong? How can I draw something that represents the data?

many thanks

R venneuler venn • 5.8k views
ADD COMMENT
2
Entering edit mode

In the past I've had similar issues with Venn diagrams and just switched to Upsets. UpSetR is a great implementation, see here for examples: https://github.com/hms-dbmi/UpSetR

ADD REPLY
0
Entering edit mode

I can't help much with Venneuler but I like BioVenn for drawing proportional Venn Diagrams.

ADD REPLY
0
Entering edit mode

A while back, I came up with a visualization called an Eulergrid that has been copied in some other packages. It's not a Venn, but it shows set overlaps in a proportional way.

ADD REPLY
1
Entering edit mode
6.8 years ago

Some combinations of set intersections are impossible to represent exactly with circles so some heuristics and approximations have to be used. Unfortunately, what the venneuler package uses leads to problems with large overlaps. The VennDiagram package seems to be doing a better job in this case.

ADD COMMENT
1
Entering edit mode
6.8 years ago
ildem ▴ 60

Thank you all! I trid other packages and it works with any one of them!

It works perfectly well with "eulerr" package on R.

library(eulerr)

vd <- euler(c(A=10, B=6, "A&B"=6))

plot(vd)

ADD COMMENT
0
Entering edit mode
6.8 years ago
theobroma22 ★ 1.2k

You have to know a little basic set theory. Suppose you want to know the size of set A and set B. What is the union between A and B, denoted as A U B?

Using absolute terms, A U B= A + B - the intersection of A & B, or A 'upside down U' B.

You will also need to know how to do this for the VennDiagram package!!

ADD COMMENT

Login before adding your answer.

Traffic: 2668 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6