2

I'd like to create this Venn diagram in LaTeX (possibly with TikZ):

enter image description here

Could you point me in the right direction? I've seen lots of Venn diagram examples using TikZ but none with concentric circles.

2
  • 4
    I can't see why concentric circles would make any difference. If any, it makes the drawing simpler.
    – JLDiaz
    Mar 9, 2013 at 22:48
  • 1
    texample.net/tikz/examples/…
    – user10274
    Mar 9, 2013 at 22:57

2 Answers 2

4

enter image description here

\documentclass[tikz,border=12pt]{standalone}
\begin{document}
\begin{tikzpicture}
    \path 
        (0,0) rectangle (8,6) [draw]
        (0.5,5.5) node {$\emptyset$}
        (2.5,2) coordinate (A) node[below] {3.4} ellipse (2 and 1.5) [draw]
        coordinate (temp) at (2.5,2)    ellipse (0.6 and 0.6) [draw]
        (temp) +(0.5,-0.75) coordinate (B) node[below left] {5.1} -- (5,3.5) -- (5.5,3.5) node[right,text width=1.5]{Environment\\contact}
        (A) -- (4.5,4.5) -- (5,4.5) node[right]{Patient contact} ;
\end{tikzpicture}
\end{document}
2
  • My coding style is a bit cryptic, isn't it? Mar 9, 2013 at 23:30
  • Thank you! that looks spot on!Might just tweak the circle sizes a little.
    – HCAI
    Mar 10, 2013 at 14:24
3

Something like this?

\documentclass{article}
\usepackage{tikz}
\begin{document}

\def\firstcircle{(0,0) circle (3cm)}
\def\secondcircle{(0,0) circle (1cm)}
\colorlet{circle edge}{black!100}
\colorlet{circle area}{black!0}
\tikzset{filled/.style={fill=circle area, draw=circle edge, thick}, outline/.style={draw=circle edge, thick}}

\setlength{\parskip}{5mm}
\begin{tikzpicture}
    \draw[outline] \firstcircle node {3.4};
    \draw (0,0.25) -- ++(5,2.5) node [fill=white] {Patient Contact};
    \draw[outline] \secondcircle node {};
    \draw (0,-1.75) -- ++(5,2.5) node [fill=white] {Environment Contact};
    \node at (0,-2) (nodeA) {5.1};
\end{tikzpicture}

\end{document}

Output:

enter image description here

1
  • Looks nice! I was looking for a replica of the pic above if possible. Are there many different ways of achieving the same result?
    – HCAI
    Mar 10, 2013 at 16:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .