3
\documentclass[tikz]{standalone}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture} [
      grow cyclic,
      level 1/.style={level distance=32mm, sibling angle=60},
      level 2/.style={level distance=16mm, sibling angle=45},
      level 3/.style={level distance=8mm, sibling angle=30},
    ]
    % Root
    \node (root) {[1] root}
      % [2]
      child foreach \name in {{[2] A},{[2] B},{[2] C}} {node {\name}}
      % [3]
    ;
    \node (2ndGenA) at(+135:48mm) {[3] D};
    \node (2ndGenB) at(-135:48mm) {[3] E};

    \draw (root) -- (2ndGenA); 
    \draw (root) -- (2ndGenB); 

    \draw[dashed] (0,0) circle [radius=32mm] circle [radius=48mm];

\end{tikzpicture}
\end{document}

enter image description here

Is it possible to use the tikz child notation to skip a generation as shown in my example for nodes 2ndGenA (D) and 2ndGenB (E)?

Note the tree should be a radial tree which is supported by the tikzlibrary trees. Afaik, the packages forest and tikz-qtree do not support radial trees. But forest would have the tier option.

Related questions:

1 Answer 1

3

I'm not sure if this is what you want, but you can use 'invisible' nodes at level 2 so it doesn't look as if there are nodes there. You just need to make them coordinates.

'skipping' levels

If the angles matter, you'll need to adjust those in the usual ways, but I guess this gives the general idea.

\documentclass[tikz,border=9pt]{standalone}
\usetikzlibrary{trees}
\begin{document}
\begin{tikzpicture} 
  [
    grow cyclic,
    level 1/.style={level distance=32mm, sibling angle=60},
    level 2/.style={level distance=16mm, },
  ]
  % Root
  \node (root) {[1] root}
  % [2]  % [3]
  child foreach \name in {{[2] A},{[2] B},{[2] C}} {node {\name}}
  child {node [coordinate] {} child {node {[3] D}}}
  child { node [coordinate] {} child {node {[3] E}}}
  ;
  \draw[dashed] (0,0) circle [radius=32mm] circle [radius=48mm];
\end{tikzpicture}
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .