[R] How to plot more than 3 sets in Venn Diagrams?

Gabor Grothendieck ggrothendieck at gmail.com
Thu Jun 9 05:10:10 CEST 2005


If the data you posted is prototypical of your datasets then note that:

- it has two disconnected components of 1 and 4 sets
- there are only 8 unique rows out of 32
- 5 of these 8 are the regions that contain only the non-intersecting
  portion of each of the 5 sets

> unique(mydata)
   AA CH EA IN MY
1   0  0  0  1  0
2   1  0  0  0  0
4   0  0  0  0  1
8   1  0  0  1  0
14  0  0  1  0  0
21  0  1  0  0  0
24  1  0  1  1  1
37  0  0  1  1  0

Thus these are not very interesting Venn diagrams as they are
quite sparse.  Perhaps you would be better off to represent them 
as bipartite graphs with a node for each row and a node for each 
column with the edges corresponding to the ones.  The RGraphViz 
package (or graphViz, itself, locatable via google) could be used for 
that.


On 6/8/05, Tan Hui Hui Jenny <medp9193 at nus.edu.sg> wrote:
> I'm trying to plot Venn diagrams with more than 3 sets (5 actually) in order to describe graphically the genetic variation between populations.
> 
> I tried the limma library but realised it can only plot 3 sets.
> 
> Is there any solution? Of course I could plot the chart manually but it'll take too long (have other datasets)..... One of my dataset is given below.
> 
> THanks for any advice.
> 
> j
> 
>        AA       CH      EA      IN      MY
> [1,]     0       0       0       1       0
> [2,]     1       0       0       0       0
> [3,]     1       0       0       0       0
> [4,]     0       0       0       0       1
> [5,]     1       0       0       0       0
> [6,]     1       0       0       0       0
> [7,]     1       0       0       0       0
> [8,]     1       0       0       1       0
> [9,]     1       0       0       0       0
> [10,]    1       0       0       0       0
> [11,]    1       0       0       0       0
> [12,]    0       0       0       0       1
> [13,]    1       0       0       0       0
> [14,]    0       0       1       0       0
> [15,]    1       0       0       0       0
> [16,]    0       0       1       0       0
> [17,]    1       0       0       0       0
> [18,]    0       0       0       1       0
> [19,]    1       0       0       1       0
> [20,]    0       0       1       0       0
> [21,]    0       1       0       0       0
> [22,]    1       0       0       0       0
> [23,]    0       0       1       0       0
> [24,]    1       0       1       1       1
> [25,]    0       1       0       0       0
> [26,]    1       0       0       0       0
> [27,]    1       0       0       0       0
> [28,]    0       0       0       1       0
> [29,]    0       0       0       1       0
> [30,]    1       0       0       0       0
> [31,]    1       0       0       0       0
> [32,]    0       0       0       1       0
> [33,]    0       0       0       1       0
> [34,]    0       1       0       0       0
> [35,]    1       0       0       0       0
> [36,]    0       0       0       1       0
> [37,]    0       0       1       1       0
> [38,]    1       0       0       1       0
> [39,]    0       0       0       1       0
> [40,]    0       0       0       1       0
> [41,]    0       1       0       0       0
> [42,]    1       0       0       0       0
> [43,]    0       0       0       1       0
> [44,]    0       0       1       0       0
> [45,]    1       0       0       0       0
> [46,]    1       0       0       0       0
> [47,]    0       0       0       1       0
> [48,]    1       0       0       0       0
> [49,]    0       0       0       1       0
> [50,]    0       0       1       0       0
> [51,]    0       0       0       1       0
> [52,]    1       0       0       0       0
> [53,]    0       0       0       1       0
> [54,]    1       0       0       0       0
> [55,]    0       1       0       0       0




More information about the R-help mailing list