1

I want to color the outersection of these two circles. I have tried to look it up since it should be very easy but I really can't figure out how to do it.. This is my "code":

\begin{tikzpicture} 

\draw (2,2) circle (3cm);

\draw (5,2) circle (3cm);

\end{tikzpicture}

And this is the outcome: This is my outcome

Cheers

1
  • Welcome! Look up the options for drawing Venn diagrams on CTAN. There is at least one TikZ-based package there which should make this easy.
    – cfr
    Commented May 21, 2016 at 13:35

2 Answers 2

3

For example:

\documentclass[tikz,border=10pt,multi]{standalone}
\usepackage{venndiagram}
\begin{document}
\begin{venndiagram2sets}[labelA={}, labelB={}]
  \fillANotB
  \fillBNotA
\end{venndiagram2sets}
\end{document}

Venn diagram

3

The even odd rule helps. Only these regions are filled, which are covered with an odd number of times. The intersection is filled twice, thus, it remains unfilled:

\documentclass{article}
\usepackage{tikz}

\begin{document}
  \begin{tikzpicture}
    \filldraw[
      radius=3cm,
      fill=gray,
      even odd rule,
    ]
      (2,2) circle[]
      (5,2) circle[]
    ;
  \end{tikzpicture}
\end{document}

Result

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .