I have plotted the below venn diagram using the code.
# Venn Diagram
grid.newpage();
venn.plot4 <- draw.quad.venn(
area1 = 849, area2 = 7181, area3 = 1776, area4 = 6254,
n12 = 0, n13 = 849, n14 = 0, n23 = 927, n24 = 6254, n34 = 0,
n123 = 0, n124 = 0, n134 = 0, n234 = 0,
n1234 = 0,
category = c("A", "B", "C", "D"),
fill = c("orange", "red", "green", "blue"),
lty = "dashed",
cex = 2,
cat.cex = 2,
cat.col = c("orange", "red", "green", "blue")
);
grid.draw(venn.plot4);
There are many non-overlapping regions(0). Could you please suggest ways to adjust the geometric shapes according to the overlapping regions ?
EDIT
After considering the suggestions by @zx8754, I have tried to plot using the venneuler
package. It looks better than the previous plot. But still, overlapping regions A and C are not reflecting the actual values(A should completely part of C). I couldn't even see the options to plot numbers on the plot. Any suggestions are welcome.
# including the null values
vd <- venneuler(c(A=849, B=7181, C=1776, D=6254,
"A&B"=0, "A&C"=849, "A&D"=0, "B&C"=927, "B&D"=6254, "C&D"=0))
plot(vd)
I have also tried d3vennR
package with the below code
venn_tooltip(
d3vennR(
data = list(
list(sets= list('A'), size= 849),
list(sets= list('B'), size= 7181),
list(sets= list('C'), size= 1776),
list(sets= list('D'), size= 6254),
list(sets= list('A','B'), size= 0),
list(sets= list('A','C'), size= 849),
list(sets= list('A','D'), size= 0),
list(sets= list('B','C'), size= 927),
list(sets= list('B','D'), size= 6254),
list(sets= list('C','D'), size= 0)
)
,layoutFunction = '
function(d) { return venn.venn(d, { initialLayout: venn.classicMDSLayout });}
'
))
Though there is an overlap between B
and C
regions, we could see there is no overlap from the output. Please advise on how to rectify this ?