# complete diagram (repeating the code)

Working with latex beamer I have:

\documentclass{beamer}

\usepackage{tikz}

\usetikzlibrary{decorations.text,calc,arrows.meta}
\begin{document}

\begin{frame}
\begin{tikzpicture}
\coordinate (O) at (0,0);

\begin{scope}[xshift=6cm]
\coordinate (O) at (0,0);

\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);

\draw[decoration={text along path,reverse path,text align={align=center},text={Boooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={aiiiii}},decorate] (1.3,0) arc (0:180:1.3);

\end{scope}
\coordinate (O) at (0,4);

\begin{scope}[xshift=2cm]
\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);

\draw[decoration={text along path,reverse path,text align={align=center},text={boooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={aiai}},decorate] (1.3,0) arc (0:180:1.3);

\end{scope}

\coordinate (O) at (-2,-2);

\begin{scope}[xshift=2cm]
\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);

\draw[decoration={text along path,reverse path,text align={align=center},text={loooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={nana}},decorate] (1.3,0) arc (0:180:1.3);

\end{scope}

\end{tikzpicture}

\end{frame}
\end{document}


This works, but I want to draw two other of this shape one at left side of this shape and the other under and between if the others.

I add again similar code but it dose not work. I know that one should change the numbers but to what for the scope ?

• Can you draw a sketch what the result should look like? And would does "it dose not work" mean? Nov 4 '16 at 15:37
• What did you try? If you want a scope to the left of that one, you need a smaller value for xshift. To put something below, you need e.g. yshift=-5cm (or some other length). Nov 4 '16 at 15:37
• Suppose "A" be the resulted shape of the above codes. Consider the coordinate plane of numbers. I would like to have one A at (0,0) another A at (0,4) and the last A at (2,-2). (the numbers are just for the example.
– tarl
Nov 4 '16 at 15:46
• Can you show us what you've tried though? It worked when I tested. (By copying the scope environment, and changing xshift=6cm to e.g. xshift=2cm.) Nov 4 '16 at 15:53
• So the problem is that you have the O coordinate away from (0,0), but the text decoration is centered on (0,0). If you inside each scope have \coordinate (O) at (0,0); as Denis showed, then the circles and text are placed around the same center point, and xshift moves both the same amount. When you have O at e.g. (4,0), and xshift=2cm in addition, the center of the circles is at (6,0), while the text is centered on (2,0). Nov 4 '16 at 16:25

Quick and dirty:

\documentclass{beamer}
\usepackage{tikz}
\usetikzlibrary{decorations.text,calc,arrows.meta}
\begin{document}
\begin{frame}
\centering
\begin{tikzpicture}
\coordinate (O) at (0,0);
\begin{scope}[xshift=0cm,scale=1]
\coordinate (O) at (0,0);
\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);
\draw[decoration={text along path,reverse path,text align={align=center},text={Boooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={aiiiii}},decorate] (1.3,0) arc (0:180:1.3);
\end{scope}

\begin{scope}[xshift=7cm,scale=1]
\coordinate (O) at (0,0);
\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);
\draw[decoration={text along path,reverse path,text align={align=center},text={Boooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={aiiiii}},decorate] (1.3,0) arc (0:180:1.3);
\end{scope}

\begin{scope}[xshift=3.5cm,yshift=-4cm,scale=1]
\coordinate (O) at (0,0);
\draw[fill=blue!40] (O) circle (2);
\draw[fill=pink!70] (O) circle (1.00);
\draw[decoration={text along path,reverse path,text align={align=center},text={Boooo}},decorate] (0.5,0) arc (0:180:0.5);
\draw[decoration={text along path,reverse path,text align={align=center},text={aiiiii}},decorate] (1.3,0) arc (0:180:1.3);
\end{scope}
\end{tikzpicture}
\end{frame}
\end{document}