3

I have used the following code to make a Venn diagram.

\begin{tikzpicture}     

        \def\firstcircle{(90:1.75cm) circle (2.5cm)} \def\secondcircle{(210:1.75cm) circle (2.5cm)} \def\thirdcircle{(330:1.75cm) circle (2.5cm)}
        \draw \firstcircle 
        node[below] {$instinct$};
        \draw \secondcircle
        node [above] {$valar$}; 
        \draw \thirdcircle 
        node [below] {$Mystic$};
     node[center] {} 
        \begin{scope}
        \clip \firstcircle;
        \fill[yellow]
        \secondcircle; 
        \end{scope} 
        \begin{scope}
        \clip \firstcircle;
        \fill[purple] \thirdcircle; 
        \end{scope}
        \begin{scope} 
        \clip \secondcircle;
        \fill[blue] \thirdcircle; 
        \end{scope}

\end{tikzpicture}

and get such a result

enter image description here

I want the center to be white like this how do I do that

enter image description here

  • Please don't use math mode ($ ... $) for italic text, it is semantically wrong, and it can in some cases give really ugly output do to bad kerning between characters. Use \textit{Valor} instead. (I assume that was a typo, that you didn't mean valar.) – Torbjørn T. Feb 24 '17 at 8:59
4

Here is a solution, adding one scope environment for the intersection of the three circles.

\documentclass{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}     
        \def\firstcircle{(90:1.75cm) circle (2.5cm)} \def\secondcircle{(210:1.75cm) circle (2.5cm)} \def\thirdcircle{(330:1.75cm) circle (2.5cm)}
        \begin{scope}
        \clip \firstcircle;
        \fill[yellow]
        \secondcircle; 
        \end{scope} 
        \begin{scope}
        \clip \firstcircle;
        \fill[purple] \thirdcircle; 
        \end{scope}
        \begin{scope} 
        \clip \secondcircle;
        \fill[blue] \thirdcircle; 
        \end{scope}
        \begin{scope} 
        \clip \secondcircle;
        \clip \firstcircle;
        \fill[white] \thirdcircle; 
        \end{scope}
        \draw \firstcircle 
        node[above] {$Instinct$};
        \draw \secondcircle
        node [above left] {$Valar$}; 
        \draw \thirdcircle 
        node [below right] {$Mystic$};
\end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.