 # Venn diagram for five events

I wish to draw a Venn diagram depicting five events and their intersections. I came across some code for three events–could someone please direct me about how i could modify it for five events.

from matplotlib import pyplot as plt
from matplotlib.patches import Circle

f = plt.figure()
ax = f.gca()
c1 = Circle((-1,0),rad, alpha=.2, fc =‘red’)
c2 = Circle((1,0),rad, alpha=.2, fc =‘blue’)
c3 = Circle((0,1),rad, alpha=.2, fc =‘green’)
ax.set_xlim(-3,3)
ax.set_ylim(-3,3)
plt.show()

This works for four events and their intersections but how do i add the fifth event along with all intersections?

from matplotlib import pyplot as plt
from matplotlib.patches import Circle

f = plt.figure()
ax = f.gca()
c1 = Circle((-1,0),rad, alpha=.2, fc =‘red’)
c2 = Circle((1,0),rad, alpha=.2, fc =‘blue’)
c3 = Circle((0,1),rad, alpha=.2, fc =‘green’)
c4 = Circle((0,-1),rad, alpha=.2, fc =‘yellow’)
ax.set_xlim(-3,3)
ax.set_ylim(-3,3)
plt.show()

···

---------- Forwarded message ----------
From: Vikram K <kpguy1975@…287…>

Date: Fri, May 6, 2011 at 7:43 AM
Subject: Venn diagram for five events
To: matplotlib-users@lists.sourceforge.net

I wish to draw a Venn diagram depicting five events and their intersections. I came across some code for three events–could someone please direct me about how i could modify it for five events.

from matplotlib import pyplot as plt

from matplotlib.patches import Circle

f = plt.figure()
ax = f.gca()
c1 = Circle((-1,0),rad, alpha=.2, fc =‘red’)
c2 = Circle((1,0),rad, alpha=.2, fc =‘blue’)
c3 = Circle((0,1),rad, alpha=.2, fc =‘green’)

ax.set_xlim(-3,3)
ax.set_ylim(-3,3)
plt.show()

hth,
Alan Isaac

···

On 5/6/2011 7:57 AM, Vikram K wrote:

I wish to draw a Venn diagram depicting five events and their intersections.

More precisely: it cannot be done with circles.

Cheers,
Alan Isaac

···

On 5/6/2011 7:57 AM, Vikram K wrote:

I wish to draw a Venn diagram depicting five events and
their intersections.

On 5/6/2011 8:07 AM, Alan G Isaac wrote: