Quantcast
Channel: Drawing a Venn diagram with three circles in a certain style - TeX - LaTeX Stack Exchange
Viewing all articles
Browse latest Browse all 4

Drawing a Venn diagram with three circles in a certain style

$
0
0

My knowledge of tikz is very limited. How can I move the middle circle (M_3) up, so that it looks like a typical Venn diagram?

My progress so far:

enter image description here

My code so far:

\documentclass{article}\usepackage{tikz}\begin{document}\begin{tikzpicture}    \def\firstcircle{(0,0) circle (1.5cm)}    \def\secondcircle{(0:2cm) circle (1.5cm)}    \def\thirdcircle{(0:1cm) circle (1.5cm)}    \colorlet{circle edge}{red!50}    \colorlet{circle area}{red!20}    \tikzset{filled/.style={fill=circle area, draw=circle edge, thick},        outline/.style={draw=circle edge, thick}}    \setlength{\parskip}{5mm}    \begin{scope}        \clip \secondcircle;        \fill[filled] \thirdcircle;    \end{scope}    \begin{scope}        \clip \firstcircle;        \fill[filled] \thirdcircle;    \end{scope}    \draw[outline] \firstcircle node {$M_1$};    \draw[outline] \secondcircle node {$M_2$};    \draw[outline] \thirdcircle node {$M_3$};    \node[anchor=south] at (current bounding box.north) {$M_1 \cap M_2 \cap M_3$};\end{tikzpicture}\end{document}

Thank you!


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images