
そこで、tikz を使用して、次のグラフを LaTeX ドキュメントに挿入したいと思います。このベン図は、5 セットの断面の可能なすべての組み合わせを示しています。また、ABCDE ではなく、単語をそこに配置したいと思います (ただし、これは問題にならないと思います)。
現在私のコードは次のとおりです:
\begin{tikzpicture}[scale = 1.3,
myellipse/.style={
draw, ellipse,
inner xsep=3.9cm,
inner ysep=2cm}]
\coordinate (C1) at (0,1.15);
\coordinate (C2) at (-0.8,0.5);
\coordinate (C3) at (-0.8,-0.2);
\coordinate (C4) at (0,-0.8);
\coordinate (C5) at (1,0);
\node[myellipse, rotate=-75] at (C1) {};
\node[myellipse, rotate=-10] at (C2) {};
\node[myellipse, rotate=70] at (C3) {};
\node[myellipse, rotate=-40] at (C4) {};
\node[myellipse, rotate=20] at (C5) {};
\end{tikzpicture}
しかし、見た目がうまくいきません。すべての断面を表示するには、パラメータをかなり正確に設定する必要があります。現在は次のようになっています。
色は必要ありません。誰か助けてくれませんか?
答え1
提案されたチャートをかなり正確に得ることができたのは、実のところ主に試行錯誤によるものでした。
私がやった方法は次の通りです:
\usepackage{tikz}
\usetikzlibrary{positioning, fit, shapes.geometric}
...
\begin{tikzpicture}[scale = 1.3,
myellipse/.style={
draw, ellipse,
inner xsep=3.9cm,
inner ysep=2cm}]
\coordinate (R1) at (-5.3,-4.5);
\coordinate (R2) at (5.3,5.5);
\draw (R1) rectangle (R2);
%\draw[step=1, opacity=0.3] (R1) grid (R2);
\coordinate (C1) at (0,1.15);
\coordinate (C2) at (-0.8,0.5);
\coordinate (C3) at (-0.8,-0.2);
\coordinate (C4) at (0,-0.8);
\coordinate (C5) at (1,0);
\node[myellipse, rotate=-75] at (C1) {};
\node[myellipse, rotate=-10] at (C2) {};
\node[myellipse, rotate=70] at (C3) {};
\node[myellipse, rotate=-40] at (C4) {};
\node[myellipse, rotate=20] at (C5) {};
\end{tikzpicture}