# Positioning one tikz with regard to another tikz nodes

I have two tikzpicture within a figure and I would like to place one tikz relatively to the other tikz nodes. I tried below of= with no success. The two tikz have different arrows and layouts. Here is the code where I need to place the second tikz under the ABC node.

    \begin{figure}[H]
\centering
\begin{tikzpicture}[node distance=4cm]
\node (1){$ABC$};
\node (2)[right of=1]{$CD$};
\path (1) edge (2);
\end{tikzpicture}

\begin{tikzpicture}
[->,>=stealth',shorten >=1pt,auto,node distance=1cm,semithick,scale=-.2]

\node (236) {$236$};
\node (136) [below left of=236]{$136$};
\node (246) [below of=236]{$246$};
\node (235) [below right of=236]{$235$};

\path (236) edge (136)  edge (246) edge(235);

\end{tikzpicture}

\caption{Example}
\label{example}
\end{figure}


How can I place the second tikz under the first one's ABC node?

• instead of doing two tikzpictures you should revert to one tikzpicture and two scopes which can be aligned accordingly. Much cleaner and much easier for TeX to align. – zeroth Aug 22 '13 at 10:51

\documentclass[border=4pt]{standalone}
\usepackage{tikz}

\begin{document}

\begin{tikzpicture}[node distance=4cm]
\node (1){$ABC$};
\node (2)[right of=1]{$CD$};
\path (1) edge (2);
\begin{scope} [below of = 1, yshift = 2.5cm,
->,>=stealth,node distance=1cm,semithick,scale=-.2]
\node (236) {$236$};
\node (136) [below left of=236]{$136$};
\node (246) [below of=236]{$246$};
\node (235) [below right of=236]{$235$};
\path (236) edge (136)  edge (246) edge(235);
\end{scope}
\end{tikzpicture}

\end{document}


I included the yshift because it uses the outer node distance of 4cm, and it looked like too much space for my taste. You can remove that or adjust as necessary.

• nice so each scope can be viewed as a tikzpicture by its own. – seteropere Aug 22 '13 at 12:24