how to add legends and values in a Venn diagram using R (VennEuler package)?

6.3k views Asked by At

I've been looking for the best way to make Venn diagrams with multiple proportional fields and so far I've been considered the best tool is venneuler from R, but I have modified the code a lot to present it exactly as I need it and I have not been able to get the format I need

With this code:

library(rJava)
library(venneuler)
vd <- venneuler(c(A=0.3, B=0.3, C=1.1, "A&B"=0.1, "A&C"=0.2, "B&C"=0.1, "A&B&C"=0.1))
plot(vd)
title("Something")

I obtain this:

Diagram that I have get so far

I've added the legends in so many ugly ways but I don like any. Also, I need to obtain the respective values in the respective fields. The image that I need I edited it in a image editor. what I want is something like:

Cool image

If you can recommend me another tool or help me with the code I will really appreciate it Thanks in advance! Cheers!

1

There are 1 answers

1
Johan Larsson On BEST ANSWER

This can be accomplished with my r package eulerr.

library(eulerr)

vd <- euler(c(A = 0.3, B = 0.3, C = 1.1,
              "A&B" = 0.1, "A&C" = 0.2, "B&C" = 0.1,
              "A&B&C" = 0.1))
plot(vd, key = TRUE, counts = TRUE)

enter image description here