Daniel Standage
Daniel Standage

Reputation: 8314

How to plot venn diagram with 4 sets

I have four sets of IDs (stored in separate text files) and I would like to create a Venn diagram showing how these sets overlap. I was able to paste the lists into this web app and get a simple diagram, but I'm looking for something over which I have a bit more control (colors, graphic size, etc). Any suggestions? My first thought would be R, but I'm comfortable trying anything out.

Upvotes: 4

Views: 12360

Answers (5)

ostrokach
ostrokach

Reputation: 19992

I was able to create good-looking Venn diagrams using creately. You have to sign up to be able to save and export your figures, but the account is free. I use it in cases where matplotlib_venn does not give good results for one reason or another.

Upvotes: 0

Hjalmar
Hjalmar

Reputation: 17

There is a python package, matplotlib-venn, for plotting proportional Venn diagrams up to 3 sets.

Upvotes: 0

Daniel Standage
Daniel Standage

Reputation: 8314

A new R package was just published today (see the article at BioMed Central). This package can plot Venn diagrams with up to 4 sets.

Upvotes: 0

Seiji Kumagai
Seiji Kumagai

Reputation: 230

It might be overkill, but how about python with matplotlib? With python's built-in set type, computing intersections and unions is trivial (e.g. set1 ^ set2 for intersection). Then, matplotlib can generate high quality graphs with relative ease. The library also let its users customize presentation of graphs extensively including figure size and colors.

As for venn diagram in matplotlib, you can find a simple example in the archive of its mailing list.

Upvotes: 1

Pedery
Pedery

Reputation: 3636

So, in the provided app you are just painting text on top of a fixed image, right? And you want to be able to create Venn-diagrams with four sets with your own colors? In that case you should be fine with pretty much any server side scripting language, i.e. PHP or ASPX. If your solution is fixed to four sets (or less), placing the ellipses appropriately should be simple math. ImageMagick should i.e. do the trick in many community-developed programming languages.

Upvotes: 1

Related Questions