# Placing nodes along an ellipse in TikZ

Is anybody aware of a simple way to place nodes at arbitrary positions along an ellipse? Ideally I would want to mimic notation like

\draw (0,0) ellipse [ x radius=2, y radius = 1] node[pos=.3] {Hi, I am a node.};


But this does not work. It is possible to splice together four curves that will do a good approximation, for instance

\node[coordinate,name=top] at (0,3) {};
\node[coordinate,name=bottom] at (0,-3) {};
\node[coordinate,name=left] at (-5,0) {};
\node[coordinate,name=right] at (5,0) {};

\draw (left) .. controls ($(left)+(0,2)$) and ($(top)-(2,0)$) .. (top);
\draw (left) .. controls ($(left)-(0,2)$) and ($(bottom)-(2,0)$) .. (bottom);
\draw (right) .. controls ($(right)+(0,2)$) and ($(top)+(2,0)$) .. (top);
\draw (right) .. controls ($(right)-(0,2)$) and ($(bottom)+(2,0)$) .. (bottom);


will give a decent approximation to

\draw (0,0) ellipse [ x radius=5, y radius = 3];


Using this method I can then use the notation I wanted to use. But if I want to make several pictures with this method or make adjustments, then it can become a lot of work. Also, the control points I picked were from guess and check as opposed to some other knowledge (this is a fault I know) so for varying sizes I will need to guess and check each time. So I am hoping for something a little more compact.

• With the arc operation (Section 13.8 of the version 2.00 TikZ manual) you can easily draw parts of an ellipse. Aug 16, 2010 at 8:00

You can let TikZ calculate the position of the node for you:

\usetikzlibrary{calc}

\begin{tikzpicture}
\draw (2,0) ellipse (2 and 1);
\node at ($(2,0)+(75:2 and 1)$) {a node};
\end{tikzpicture}


The key here is that (75:2 and 1) is the position at 75 degrees on an ellipse with axis lengths 2 and 1 centered at (0,0). The (2,0) is just an example how you get an off-center position.

• Awesome. I did not realize that you could put an ellipse inside of the angular coordinates. This fits perfectly for what I was thinking. Aug 17, 2010 at 15:01

One thing you could do is create an elliptical node and then use the anchor points of that node. So for example,

\node[draw,ellipse,minimum height=2cm,minimum width=4cm] (a) at (0,0) {};
\node[above right] at (a.75) {Hi I am a node};


Here 75 is the angle around the ellipse where you want the text node to be placed.

With pgf 2.10 CVS !! You need to use arc operation because you need to know the path wih a point for the beginning and a point final. Idem for the circle.

\documentclass[11pt]{scrartcl}
\usepackage{tikz}
\usetikzlibrary{%
arrows,
calc
}

\begin{document}
\begin{tikzpicture}

\draw (8,0) arc [start angle=0,
end angle=360,

• I don't know if it is ever needed but adding -- cycle might be an option just to be on the safe side. May 3, 2012 at 8:01
• Is it possible to do the same thing but with a rotated ellipse? The attribute rotate=45 does not work on arcs... Feb 6, 2018 at 23:10