user907725
user907725

Reputation:

Show counts in Venneuler R package

Does anybody know how to display the count of each subset in a Venneuler plot? Also, how can I write the labels next to the circles instead of the default setting (inside the circles)? Thanks very much!!

Here's an example from the package manual:

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)

Upvotes: 4

Views: 5444

Answers (1)

user2030503
user2030503

Reputation: 3104

This will show labels for counts manually added up:

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))

vd$labels<- c(
  paste("A\n",0.3+0.1+0.2+0.1),
  paste("B\n",0.3+0.1+0.1+0.1),
  paste("C\n",1.1+0.2+0.1+0.1)
)

plot(vd)

enter image description here

Upvotes: 2

Related Questions