![在 LaTeX 中编辑维恩图](https://linux22.com/image/350099/%E5%9C%A8%20LaTeX%20%E4%B8%AD%E7%BC%96%E8%BE%91%E7%BB%B4%E6%81%A9%E5%9B%BE.png)
我使用以下代码制作了维恩图。
\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}
并得到这样的结果
我希望中心像这样是白色,我该怎么做
答案1
这是一个解决方案,scope
为三个圆的交点添加一个环境。
\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}