tikz add tag
topnush
I can draw a Venn diagram with:

```
\documentclass{standalone}

\usepackage{tikz}


\begin{document}

 

\begin{tikzpicture}
\def\radius{2cm}
\def\mycolorbox#1{\textcolor{#1}{\rule{2ex}{2ex}}}
\colorlet{colori}{blue!70}
\colorlet{colorii}{red!70}

\coordinate (ceni);
\coordinate[xshift=\radius] (cenii);

\draw[fill=colori,fill opacity=0.5] (ceni) circle (\radius);
\draw[fill=colorii,fill opacity=0.5] (cenii) circle (\radius);

% Label A
\node[above] at ([yshift=\radius]ceni) {$A$};
% Label B
\node[above] at ([yshift=\radius]cenii) {$B$};

\draw  ([xshift=-20pt,yshift=20pt]current bounding box.north west) 
  rectangle ([xshift=20pt,yshift=-20pt]current bounding box.south east);



\end{tikzpicture}


\end{document}
```

![venn_diagram.png](/image?hash=69d2c24f0aa287ff3f19e9f0fa1bfd1079eb92b362eb6438ca22230cd873072b)

I would like to randomly scatter the letters a to z in the Venn diagram (one copy of each letter).  How can one do that?
Top Answer
samcarter
As a quick solution you could randomly distribute the letters in an indescribed rectangle:

```
\documentclass{standalone}

\usepackage{tikz}
\pgfmathsetseed{\number\pdfrandomseed}


\begin{document}

 

\begin{tikzpicture}
\def\radius{2cm}
\def\mycolorbox#1{\textcolor{#1}{\rule{2ex}{2ex}}}
\colorlet{colori}{blue!70}
\colorlet{colorii}{red!70}

\coordinate (ceni);
\coordinate[xshift=\radius] (cenii);

\draw[fill=colori,fill opacity=0.5] (ceni) circle (\radius);
\draw[fill=colorii,fill opacity=0.5] (cenii) circle (\radius);

% Label A
\node[above] at ([yshift=\radius]ceni) {$A$};
% Label B
\node[above] at ([yshift=\radius]cenii) {$B$};

\draw  ([xshift=-20pt,yshift=20pt]current bounding box.north west) 
  rectangle ([xshift=20pt,yshift=-20pt]current bounding box.south east);
  
\foreach \macro in {a,...,z}{
  \pgfmathsetmacro\ranx{4.8*random()-1.4}
  \pgfmathsetmacro\rany{2.8*random()-1.4}  
  \node at (\ranx,\rany) {\macro};
}

\end{tikzpicture}

\end{document}
```

![document-1.png](/image?hash=98068ae6547b046798070ab9ff8aa4dce8be57516fc7e84410eb95eb8458aa4d)

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.