2

Possible Duplicate:
How to generate all possible Venn diagrams (with the case below) efficiently?

I want to shade a diagram involving three sets A, B and C. The specific region that needed to be shaded is what is in set C which is not overlapping with any of the other sets A and B. In the code below, I don't know how to exclude shading the portion which involves intersection of A, B and C.

\begin{tikzpicture}
\def \leftcircle{(0, 0) circle(1.5 cm)}
\def \rightcircle{(2cm, 0cm) circle(1.5 cm)}
\def \bottomcircle{(315:2cm) circle(1.5 cm)}

\def \cliprect {(-1.5, -3.0) rectangle (3.5, 1.5)};

\draw \cliprect;

\begin{scope}[even odd rule]
    \clip \leftcircle \rightcircle \cliprect;
    \fill[pattern=vertical lines] \bottomcircle;
\end{scope}

\draw \leftcircle node[above] {$A$};
\draw \rightcircle node[above] {$B$};
\draw \bottomcircle node[below] {$C$};

\end{tikzpicture}
2
  • 4
    This question is very similar to this other how to generate all possible venn diagrams.... Please take a look at it as the answers there might help you. If they do, that's great, and we'll probably close this question as a duplicate just to keep the place tidy and to help people find the answers quickly. If they don't, please edit your question here to explain why so that people can better focus their attention to help you. – Paul Gaborit Sep 9 '12 at 15:34
  • 2
    In addition to the question that Paul linked to, you can check out How to draw Venn diagrams (especially complements) in LaTeX. – Alan Munn Sep 9 '12 at 15:35

Browse other questions tagged or ask your own question.