I'm trying to have this tree in LaTeX and I found this helpful response on this site but I easily got lost with all the brackets that are going on and I now have this
Which is achieved by the following code:
\usepackage{tikz-qtree}
\usetikzlibrary{arrows.meta,bending}
\tikzset{every tree node/.style={minimum width=2em,draw,circle},
blank/.style={draw=none},
edge from parent/.style=
{draw, edge from parent path={(\tikzparentnode) -- (\tikzchildnode)}},
level distance=1.5cm}
\begin{tikzpicture}
\Tree
[.51
[.12 ]
[.87
\edge[blank]; \node[blank]{};
\edge[.52
\edge[]; {83}
\edge[blank]; \node[blank]{};
]
[.40
\edge[]; {20}
\edge[blank]; \node[blank]{};
]
]
]
\end{tikzpicture}
I know that someone can easily fix all these brackets for me but I would appreciate another method that is easier, much more, so that I can also do the rest of the trees that I want to make on my own.
Best Answer
i would simplify tree layout as follows:
and in drawing use package
forest
:addedndum: considering caverac comment: