1

tree diagram

i want to draw a tree with thicker branches like the one in the picture, what could i put instead of ''thick'' ?

\documentclass[border=3.141592]{standalone}
\usepackage{forest}

\begin{document} \begin{forest} for tree={grow=0} [$A$,for tree={edge={red ,thick}} [$V $,edge label={node[pos=0.7,left ,font= \small]{$x$}} [$G$[.][.]][$H$[.][.]]] [$EF$[$J$[.][.]][$K$[.][.]]]] \end{forest} \end{document}

Zarko
  • 296,517

1 Answers1

1

Well, before will be closed ... some off topic suggestion:

  • it is not clear (to me) if you like to change line width for only one edge, branch of edges, or for all edges
  • in example are shown all possibilities
  • added are styles for edge labels
  • added are nodes stale math content
\documentclass[border=3.141592]{standalone}
%\documentclass{article}
\usepackage{forest}
\usetikzlibrary{arrows.meta}

\begin{document} \begin{forest} for tree={ % nodes inner sep=2pt, math content, % tree grow=0, edge={semithick},% edge = arr, }, %% edge labels /tikz/ELS/.style = {% Edge Label Style node font=\scriptsize, text=cyan, inner sep=0pt, pos=0.5, anchor=#1 east}, EL/.style = {if n=1{edge label={node[ELS=north]{$#1$}}} {edge label={node[ELS=south]{$#1$}}}} %%%% diagram body [A, [V, for tree={edge={red ,ultra thick}} % lower branch will be red and ultra thick , EL=x [G, EL=u [.][.]] [H, EL=v [.][.]] ] [EF, EL=y, edge={blue,thick} % only for one edge [J[.][.]] [K[.][.]] ] ] \end{forest} \end{document}

enter image description here

Zarko
  • 296,517