2

I used this answer to create a similar tree: https://tex.stackexchange.com/a/256753/175628

However the arrows do not align: with the joining lines: enter image description here

Here is the forest code:

\begin{figure}[H]
\begin{center}
\begin{forest}
  for tree={
    align=center,
    parent anchor=south,
    child anchor=north,
    font=\sffamily,
    edge={thick, -{Stealth[]}},
    l sep+=10pt,
    edge path={
      \noexpand\path [draw, \forestoption{edge}] (!u.parent anchor) -- +(0,-10pt) -| (.child anchor)\forestoption{edge label};
    },
    if level=0{
      inner xsep=0pt,
      tikz={\draw [thick] (.south east) -- (.south west);}
    }{}
  }
  [Graphical User Interface
    [\textbf{Drawing Functions}, name=A
      [\textbf{Plot Pane}
        [\textbf{Layer System}
          [\textbf{Draw onto Canvas}]
          [\textbf{Clear the Canvas}]
          [\textbf{Bind Properties}]
        ]
      ]
    ]
    [Shared Layer Access, name=C]
    [Inputing Functions, name=B
      [Add Functions]
      [Remove Functions]
      [Modify Functions]
    ]
  ]
\draw[-latex] (A) to[out=east,in=west] (C);
\draw[-latex] (B) to[out=west,in=east] (C);
\end{forest}
\end{center}
\caption{Graphical User Interface Hierarchical Diagram}

If the preamble is needed I will post it but it is the most horrible thing I have mashed together.

2
  • Welcome! Please post compilable code i.e. a complete example. – cfr Nov 28 '18 at 2:43
  • 1
    @cfr Sorry my bad, I am using subfiles so I did know what packages were needed, but I will do that next time! – Leafy1201 Nov 28 '18 at 21:56
2

Welcome to TeX.SE! Are you looking for calign=child,calign child=2?

\documentclass[tikz,border=3.14mm]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
  for tree={
    align=center,
    calign=child,calign child=2,
    font=\sffamily,
    edge+={thick, -{Stealth[]}},
    l sep'+=10pt,
    fork sep'=10pt,
  },
  forked edges,
  if level=0{
    inner xsep=0pt,
    tikz={\draw [thick] (.children first) -- (.children last);}
  }{},
  [Graphical User Interface
    [\textbf{Drawing Functions}, name=A
      [\textbf{Plot Pane}
        [\textbf{Layer System}
          [\textbf{Draw onto Canvas}]
          [\textbf{Clear the Canvas}]
          [\textbf{Bind Properties}]
        ]
      ]
    ]
    [Shared Layer Access, name=C]
    [Inputing Functions, name=B
      [Add Functions]
      [Remove Functions]
      [Modify Functions]
    ]
  ]
\draw[-latex] (A) to[out=east,in=west] (C);
\draw[-latex] (B) to[out=west,in=east] (C);
\end{forest}
\end{document}

enter image description here

1
  • Thank you for the warm welcome and the answer! – Leafy1201 Nov 27 '18 at 22:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.