# How to write inside an ellipse in TikZ?

I have drawn an ellipse:

\node (elli) [ellipse, minimum height=3cm,minimum width=2cm, draw] {};


I would like to write some elements in it as the figure below shows. The position of the elements do not need to be precise, but I want them to be inside the ellipse.

Does anyone know how to do it?

-

You can use the fit library to fit an ellipse node around some other nodes. The syntax is fit={(<node1>) (<node2>) ...}. To randomly place some nodes, you can use xshift=rnd*<length> and yshift=rnd*<length>. The random numbers change every minute, so to keep your results reproducible, you should fix the random seed using pgfmathsetseed=<integer>:

\documentclass[a4paper]{article}

\usepackage{tikz}
\usetikzlibrary{fit,shapes}

\begin{document}

\pgfmathsetseed{12}

\begin{tikzpicture}[
random position/.style={
xshift=rnd*0.5cm,
yshift=rnd*2cm
}
]
\node (a) [random position] {1};
\node (b) [random position] {5};
\node (c) [random position] {7};
\node (d) [random position] {11};
\node (e) [random position] {$\cdots$};
\node [draw,ellipse,fit={(a) (b) (c) (d) (e)}] {};
\end{tikzpicture}

\end{document}

-