making (very simple) Venn diagrams?

hi all,

can someone advise on how to make simple venn diagrams, like the one here:

http://en.wikipedia.org/wiki/File:Venn_diagram_cmyk.svg

simply three (or more) intersecting circles, such that one can label every point of their intersection, and maybe make the circles in size proportion to the number of elements they are supposed to represent. i know some people use Sage for this but i prefer to use matplotlib directly.

any help / info on how to get started on this or some example code would be greatly appreciated.

thank you.

Try this:

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

f = plt.figure()
ax = f.gca()
rad = 1.4
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.add_patch(c1)
ax.add_patch(c2)
ax.add_patch(c3)
ax.set_xlim(-3,3)
ax.set_ylim(-3,3)
plt.show()

J.

ยทยทยท

On Sun, Mar 1, 2009 at 6:32 PM, per freem <perfreem@...287...> wrote:

hi all,

can someone advise on how to make simple venn diagrams, like the one here:

http://en.wikipedia.org/wiki/File:Venn_diagram_cmyk.svg

simply three (or more) intersecting circles, such that one can label every
point of their intersection, and maybe make the circles in size proportion
to the number of elements they are supposed to represent. i know some
people use Sage for this but i prefer to use matplotlib directly.

any help / info on how to get started on this or some example code would be
greatly appreciated.

thank you.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users