Friday, 15 November 2013

Python: Venn Diagram

Venn Diagram is very useful for visualizing operations between events/sets. So in this post, we will learn how to visualize one in Python. First, we need to install the module matplotlib-venn. Open the terminal or command prompt, and run the following code:

Now that we have it, here are the three set operations I visualized:
$A\cup B$
$A\cap B$

$A^c\cap B$

Codes:


No comments:

Post a Comment