1

I am trying to produce a three-sets Venn diagram illustrating my research agenda and my published work. I am having a hard time including the comments inside the circles, particularly regarding the location of the text.

This is what I am looking for: Venn Diagram

Here is my current code:

\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}

Also, if the name of the article is too big (for example, the title of Article 9 in the above Figure), how could I break the line to fit the entire title of the article?

2

I will be happy to adjust. I am stuck because the labels appearing in your code and on your desired screen shot differ, and I think you want to use those of your code. However, I am not sure, so I stopped at some point.

The main things I did change are

  • Switch to positioning syntax (and load the corresponding library). The positioning syntax is e.g. right=1mm of ... instead of right of=.... This way of positioning is IMHO truly superior to the built-in one.

  • Introduce text width where appropriate.

Result:

\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}

enter image description here

  • I have a black background. How to turn the circles and the text into white at once? – Thiago Sep 20 '18 at 0:56
  • 1
    @Thiago Just add fill=white : venncircle/.style={draw, circle, minimum size=22em, align=center} -> venncircle/.style={draw, circle, minimum size=22em, align=center,fill=white} and the same in the last 3 nodes which have ,text width : ,text width -> ,fill=white,text width. – user121799 Sep 20 '18 at 2:09
  • 1
    Thank you @marmot. I also discovered that adding the following code before \begin{document} works: \usepackage{xcolor} \usepackage{pagecolor} \pagecolor{black} \color{white}. – Thiago Sep 20 '18 at 2:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.