I would like to draw a tree diagram consisting of circle nodes with three subparts divided by a t-line (see sample below). Instead of separating every tree node by hand I would like to only specify the style of the node accompanied by at least three parameters (the fields inside the circle node drawing). I already achieved the following by putting the following by putting this stackexchange circle node with t-lines example into a style:
\tikzset{%
sectors/.style n args={5}{%
circle,
draw,
minimum width=#4,
append after command={
\pgfextra{
\draw (\tikzlastnode.center) -- (\tikzlastnode.south) ;
\draw (\tikzlastnode.west) -- (\tikzlastnode.east) ;
\path (\tikzlastnode.center) -- node[#5] {#1} (\tikzlastnode.north);
\path (\tikzlastnode.center) -- node[#5] {#2} (\tikzlastnode.south west);
\path (\tikzlastnode.center) -- node[#5] {#3} (\tikzlastnode.south east);
}
}
}
}
This works fine as long as there is only one root node. But as soon as I want to draw children nodes tikz fails to compile sayiong "Error: No shape named is known. [...]". So the following does not work.
\begin{tikzpicture}[]
\node[sectors={0}{1}{1}{1.5cm}{}]{}%
child{
node [sectors={1}{2}{3}{1.5cm}{font=\bfseries}]{}
};%
\end{tikzpicture}
I already noticed that there are problems with using tex macros within tree structures but I was not able to find a solution through the answers given there. I have not specified a simple tex-macro but a parameterized style. Maybe under the hood this works similar but I am not a pro when it comes to tikz and therefore was not able to adapt the solutions to this case.
Any help would be appreciated.
Here you see an outline of the tree structure I want to achieve: