2

I have the following qtree, and cannot figure out why the edges to the leaves start as a single edge then split into two. I am trying to make a binary tree with all the leaves aligned to the bottom, which is why I am setting the distance from root.

\begin{figure}
\begin{minipage}{.6\linewidth}
\begin{tikzpicture}
\tikzset{frontier/.style={distance from root=145pt}}
\Tree [.a 
            [.b 
                [.c 
                    [e f ] ] 
                [.d 
                    [g h ] ] ]
            [.i 
                [.j 
                    [.l 
                        [n o ]]
                    [.m 
                        [p q ]]]
                [.k 
                    [r s ]]]]

\end{tikzpicture}
\end{minipage}\hfill

enter image description here

1 Answer 1

2

like this:

enter image description here

with forest is simple:

\documentclass[margin=3mm]{standalone}
\usepackage{forest}

\begin{document}
\begin{forest}
for tree={parent anchor=south, 
          child anchor=north},
where n children=0{tier=word}{}
  [a
    [b
        [c
            [e] 
            [f]
        ]
        [d
            [g]
            [h]
        ] 
    ] 
    [i
        [j
            [l
                [n]
                [o]
            ]
            [m
                [p]
                [q]
            ]
        ]
        [k
            [r]
            [s]
        ]
    ]
  ]
    \end{forest}
\end{document}

You must log in to answer this question.

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