如何绘制一个圆圈内包含多个圆圈的维恩图?

如何绘制一个圆圈内包含多个圆圈的维恩图?

就像这。我不知道从哪里开始一样。我不知道为什么 Tikz 让我这么困惑。

答案1

欢迎来到 TeX.SE!本网站的运作方式是,如果您对某些 TeX 代码有疑问,您可以将其以所谓的平均能量损失即一份以 开头\documentclass和结尾的极简文档\end{document},其中包含一些有关您遇到困难的信息。但是,由于您是新手,我想给您一个开始,希望您能抽出时间亲自尝试一下,并发现它有多有趣。

\documentclass[tikz,border=3.14mm]{standalone}
\begin{document}
\begin{tikzpicture}[font=\sffamily]
\foreach \X [count=\Y starting from 2] in {C,B,A}
{\draw (-\Y,-\Y/2) circle ({1.5*\Y} and \Y);
\node at (1-2*\Y,-1.1*\Y) {class \X}; }
\draw ([xshift=-0.5cm,yshift=-0.5cm]current bounding box.south west)
rectangle ([xshift=0.5cm,yshift=0.5cm]current bounding box.north east);
\node[anchor=south] at (current bounding box.north) {Three classes};
\end{tikzpicture}
\end{document}

在此处输入图片描述

当然,有专门的软件包,让你可以做更复杂的事情,只需进行 Google 搜索即可。

相关内容