tikz 中的複雜維恩圖

tikz 中的複雜維恩圖

所以我想使用 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}

相關內容