[Tex/LaTex] To draw a hierarchy tree diagram

tikz-pgf

i am new to latex. how can i make a hierarchy tree diagram as shown below?enter image description here

Best Answer

Updated answer (current Forest)

This version uses the edges library. If you get errors, use the code below or, preferably, update your TeX installation.

\documentclass[tikz,border=10pt]{standalone}
\usepackage[edges]{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{forest}
  for tree={
    align=center,
    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);}
  }{},
  [Angiography Based On Medical Imaging Modalities
    [Biplane\\X-Ray/DSA]
    [Magnetic\\Resonance
      [Contrast Enhanced]
      [Non-Contrast Enhanced
        [Time of Flight]
        [Black-Blood]
        [Phase Contrast]
        [T2]
        [T2\textsuperscript{*}]
      ]
    ]
    [Computed-\\Tomography, calign with current]
    [Ultrasound]
    [Fusion of\\Modalities]
  ]
\end{forest}
\end{document}

with current Forest

Original answer

A slightly different forest solution which uses tikz to draw the line under the root. This also lines things up in a way which I think is neater than shown in the target image but, obviously, tastes differ so your kilometres may vary.

\documentclass[tikz,border=10pt]{standalone}
\usepackage{forest}
\usetikzlibrary{arrows.meta}
\begin{document}
\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);}
    }{}
  }
  [Angiography Based On Medical Imaging Modalities
    [Biplane\\X-Ray/DSA]
    [Magnetic\\Resonance
      [Contrast Enhanced]
      [Non-Contrast Enhanced
        [Time of Flight]
        [Black-Blood]
        [Phase Contrast]
        [T2]
        [T2\textsuperscript{*}]
      ]
    ]
    [Computed-\\Tomography, calign with current]
    [Ultrasound]
    [Fusion of\\Modalities]
  ]
\end{forest}
\end{document}

tikz underlining

Related Question