I want to create a tree in TikZ with more than two branches.
With the code below I get the first shown image, but I need a tree as shown
in the second picture. The arrow positions should not given in explicit coordinates, but
relative to the boxes. The arrows should all start on the same point and end on top of the boxes in the middle.
Thank you for your help
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{nicefrac} \usepackage{amssymb} \usetikzlibrary{positioning,arrows,automata,calc,shapes} \begin{document} \newcommand{\Symmetry}[3] { \begin{minipage}{1.5cm} \centering {{#1}}% \linebreak {{#2}}% \linebreak {{#3}}% \end{minipage} } \newcommand{\Wyckoff}[3] { \begin{minipage}{1.5cm} \centering {{#1}}% \linebreak {{#2}}% \linebreak {{#3}}% \end{minipage} } \begin{tikzpicture}[->,>=stealth',shorten >=1pt,node distance=3.0cm] %% Fill Color Styles \tikzstyle{ElementFill} = [fill=yellow!15] %% Element Styles \tikzstyle{Element} = [draw=black, ElementFill, minimum width=1.75cm, minimum height=1.75cm, node distance=1.75cm] \tikzstyle{every state}=[fill=white,draw=black,text=black,minimum size=45pt] \node[name=Na11, Element] {\Symmetry{Na:}{1\textit{a}}{$\bar{3}$\textit{m}}}; \node[name=KoNa11, below of=Na11, Element] {\Wyckoff{0}{0}{0}} ; \node[name=Na12, below=2cm of KoNa11, Element] {\Symmetry{Na:}{2\textit{a}}{2/\textit{m}}}; \node[name=KoNa12, below of=Na12, Element] {\Wyckoff{0}{0}{0}} ; \node[name=Na13, below=2cm of KoNa12, Element] {\Symmetry{Na1:}{4\textit{g}}{2}}; \node[name=KoNa13, below of=Na13, Element] {\Wyckoff{0}{0.1578}{0}}; \node[name=Na14, right of=Na13, Element] {\Symmetry{$\Box$:}{2\textit{a}}{2/\textit{m}}}; \node[name=KoNa14, below of=Na14, Element] {\Wyckoff{0}{0}{0}}; \node[name=Na21, right of=Na14, Element] {\Symmetry{$\Box$:}{2\textit{a}}{2/\textit{m}}}; \node[name=KoNa21, below of=Na21, Element] {\Wyckoff{0}{0}{0}}; \node[name=Na22, right of=Na21, Element] {\Symmetry{$\Box$:}{2\textit{a}}{2/\textit{m}}}; \node[name=KoNa22, below of=Na22, Element] {\Wyckoff{0}{0}{0}}; \node[name=Na23, right of=Na22, Element] {\Symmetry{$\Box$:}{2\textit{a}}{2/\textit{m}}}; \node[name=KoNa23, below of=Na23, Element] {\Wyckoff{0}{0}{0}}; \node[name=Mn, right of=Na11, Element] {\Symmetry{Mn:}{2\textit{d}}{3\textit{m}}}; \node[name=KoMn, below of=Mn, Element] {\Wyckoff{\nicefrac{1}{3}}{\nicefrac{2}{3}}{0.6247}}; \node[name=Te, right of=Mn, Element] {\Symmetry{Te:}{2\textit{d}}{3\textit{m}}}; \node[name=KoTe, below of=Te, Element] {\Wyckoff{\nicefrac{1}{3}}{\nicefrac{2}{3}}{0.2571}}; \draw[->, blue!50, very thick] (KoNa11) to (Na12); \draw[->, blue!50, very thick] (KoNa12) to (Na13); \draw[->, blue!50, very thick] (KoNa12) to (Na14); \draw[->, blue!50, very thick] (KoNa12) to (Na21); \draw[->, blue!50, very thick] (KoNa12) to (Na22); \draw[->, blue!50, very thick] (KoNa12) to (Na23); \end{tikzpicture} \end{document}
[solved]
Adding ".south"/".north" to the node names.
"north east" resp. "south west" etc. works too.
\draw[->, blue!50, very thick] (KoNa11) to (Na12);
\draw[->, blue!50, very thick] (KoNa12) to (Na13);
\draw[->, blue!50, very thick] (KoNa12.south) to (Na14.north);
\draw[->, blue!50, very thick] (KoNa12.south) to (Na21.north);
\draw[->, blue!50, very thick] (KoNa12.south) to (Na22.north);
\draw[->, blue!50, very thick] (KoNa12.south) to (Na23.north);