Drawing a Venn diagram
A Venn diagram displays several sets with their relationships. Commonly, these are overlapping circles. Such sets can stand for certain properties. If an element has two such properties, it will belong to an overlapping area-the intersection of the two relevant sets.
In this recipe, we will draw a Venn diagram of three sets.
How to do it...
We will draw colored circles and apply blending to their intersections. Go through these steps:
Choose a document class:
\documentclass{article}
Load the
tikz
package:\usepackage{tikz}
Begin the document:
\begin{document}
Begin a TikZ picture environment:
\begin{tikzpicture}
Use a
scope
environment to apply a style to a part of the drawing. Here, we apply color blending:\begin{scope}[blend group=soft light]
Draw the diagram parts, which in our case are simply filled circles:
\fill[red!30!white] ( 90:1.2) circle (2); \fill[green!30!white] (210:1.2) circle (2); \fill[blue!30!white] (330:1.2) circle (2);
End the
scope
environment...