I have the following code in Overleaf (Please excuse the \hspace{}
filler):
\documentclass[margin=3mm, varwidth]{standalone}
\usepackage{tikz-qtree}
\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{document}
\begin{figure}
\centering
\begin{tikzpicture}
\Tree
[.\hspace{0.01cm}
[.\hspace{0.01cm}
[.\hspace{0.01cm} ]
[.\hspace{0.01cm} ]
]
[.\hspace{0.01cm}
[.\hspace{0.01cm}
[.\hspace{0.01cm} ]
[.\hspace{0.01cm} ]
]
[.\hspace{0.01cm} ]
]
]
\end{tikzpicture}
\caption{A simple tree.}
\label{fig:tree}
\end{figure}
\end{document}
Which provides the following tree where nodes are circles without text (and is structurally correct):
However, I would like to fill the circles of individual (chosen) nodes with different colours. Is this possible with qtree
, or do I need to move to an alternative like forest
?