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:
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!
\thirdcircle
to\def\thirdcircle{([yshift=1.5cm]0:1cm) circle (1.5cm)}
– vi pa Dec 5 '20 at 12:14\documentclass
and end with\end{document}
. – schtandard Dec 5 '20 at 13:11