使用 TikZ 绘制的三集维恩图,圆圈内外均有注释/标签

使用 TikZ 绘制的三集维恩图,圆圈内外均有注释/标签

我正在尝试制作一个三组维恩图来说明我的研究议程和我发表的作品。我很难将评论包含在圆圈内,尤其是关于文本位置的评论。

这就是我所寻找的: 维恩图

这是我当前的代码:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}[venncircle/.style={draw, circle, minimum size=30em, align=center}, node distance=17em] 
    \node[venncircle] (circle1) {10};    
    \node[venncircle, right of=circle1] (circle2) {6};
    \node (MN) at ($(circle1)!0.5!(circle2)$){9};
    \node[venncircle, below of=MN, yshift=3em] (circle3) {};    
    \node (ML)  at ($(circle1)!0.5!(circle3)$){5};  
    \node (NL)  at ($(circle2)!0.5!(circle3)$){4};   
    \node (MNL)  at ($(MN)!0.3!(circle3)$){2};
    \node (Lleft) [below of=ML, yshift=5em] {16};
    \node (Lright) [below of=NL, yshift=5em] {21};
    \node (outtoprightnum) [above right of=circle2, yshift=4em, xshift=-7em] {\textbf{\textit{\large Comparative Political Institutions}}};
    \node (U)[above left of=circle1, xshift=7em, yshift=4em]    {\textbf{\textit{\large Comparative Political Economy}}};
    \node (M)[above of=circle1, yshift=-4em]{\textbf{}};
    \node (N)[above of=circle2, yshift=-4em]{\textbf{}};
    \node (L)[below right of=circle3, yshift=-4em, xshift=-12em]{\textbf{\textit{\large Political Methodology / Formal     Theory}}};
\end{tikzpicture} 
\end{figure}

\end{document}

另外,如果文章名称太大(例如上图中第 9 篇文章的标题),我该如何分行以适合整个文章标题?

答案1

我很乐意调整。我被卡住了,因为你的代码和你想要的屏幕截图中出现的标签不同,我思考您想使用代码中的这些内容。但是,我不确定,所以我在某个时候停了下来。

我所做的主要改变是

  • 切换到定位语法(并加载相应的库)。定位语法是例如right=1mm of ...而不是right of=...。我认为这种定位方式确实比内置方式更优越。

  • 在适当的地方进行介绍text width

结果:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usetikzlibrary{backgrounds,calc,positioning}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}[venncircle/.style={draw, circle, minimum size=22em,
 align=center}, node distance=12em] 
    \node[venncircle] (circle1) {Article 10};    
    \node[venncircle, right=-2cm of circle1] (circle2) {Article 6};
    \node (MN) at ($(circle1)!0.5!(circle2)+(0,2em)$){Article 9};
    \node[venncircle, below=3em of MN] (circle3) {Article 7};    
    \node (ML)  at ($(circle1)!0.5!(circle3)$){Article 5};  
    \node (NL)  at ($(circle2)!0.5!(circle3)$){Article 4};   
    \node (MNL)  at ($(MN)!0.35!(circle3)$){Article 2};
    \node (Lleft) at ($(circle3.center)+(-135:7em)$) {Article 16};
    \node (Lright) at ($(circle3.center)+(-45:7em)$) {Article 21};
    \node (outtoprightnum) [above=1mm of circle2,font=\itshape\bfseries\large,text width=4cm] 
     {Comparative Political Institutions};
    \node (U)[above=1mm of circle1,font=\itshape\bfseries\large,text width=4cm]    {Comparative Political Economy};
%     \node (M)[above=1mm of circle1, yshift=-4em]{\textbf{}};
%     \node (N)[above=1mm of circle2, yshift=-4em]{\textbf{}};
    \node (L)[below=1mm of circle3,font=\itshape\bfseries\large,text width=6cm]
     {Political Methodology / Formal Theory};
\end{tikzpicture} 
\end{figure}

\end{document}

在此处输入图片描述

相关内容