# Three sets with counts

> A survey of drink preferences with the number of people in each of the seven regions. A Venn and Euler diagrams example with its LaTeX source.

A Venn and Euler diagrams example in the TeXeR TikZ library: https://texer.org/library/set-diagrams/venn-counts

Package: [Venn and Euler diagrams](https://texer.org/library/set-diagrams.md), on CTAN at https://ctan.org/pkg/pgf.

Tags: venn, three sets, counting, survey

## Source

```latex
\begin{tikzpicture}[every node/.style={font=\small}]
  \fill[blue!40, fill opacity=0.25] (90:1) circle (1.6);
  \fill[orange!70, fill opacity=0.25] (210:1) circle (1.6);
  \fill[green!50!black, fill opacity=0.25] (330:1) circle (1.6);
  \draw[thick] (90:1) circle (1.6) (210:1) circle (1.6) (330:1) circle (1.6);
  \node[font=\small\bfseries] at (90:2.85) {Tea};
  \node[font=\small\bfseries] at (-2.3,-2.4) {Coffee};
  \node[font=\small\bfseries] at (2.3,-2.4) {Juice};
  \node at (90:1.7) {12};
  \node at (210:1.7) {18};
  \node at (330:1.7) {9};
  \node at (150:1) {6};
  \node at (30:1) {4};
  \node at (270:1) {5};
  \node at (0,0) {3};
\end{tikzpicture}
```

## As a complete document

The same example in a document that compiles on its own with pdfLaTeX:

```latex
\documentclass[margin=3mm]{standalone}
\usepackage{tikz}
\usepackage{xcolor}
\usepackage{amsmath}
\usepackage{amssymb}

\begin{document}
\begin{tikzpicture}[every node/.style={font=\small}]
  \fill[blue!40, fill opacity=0.25] (90:1) circle (1.6);
  \fill[orange!70, fill opacity=0.25] (210:1) circle (1.6);
  \fill[green!50!black, fill opacity=0.25] (330:1) circle (1.6);
  \draw[thick] (90:1) circle (1.6) (210:1) circle (1.6) (330:1) circle (1.6);
  \node[font=\small\bfseries] at (90:2.85) {Tea};
  \node[font=\small\bfseries] at (-2.3,-2.4) {Coffee};
  \node[font=\small\bfseries] at (2.3,-2.4) {Juice};
  \node at (90:1.7) {12};
  \node at (210:1.7) {18};
  \node at (330:1.7) {9};
  \node at (150:1) {6};
  \node at (30:1) {4};
  \node at (270:1) {5};
  \node at (0,0) {3};
\end{tikzpicture}
\end{document}
```
