I am trying to program in TeX the following decision tree but I am facing some difficulties, especially with diagonal arrows.

Some suggestions or help is extremely appreciated!

enter image description here

  • 2
    Welcome to TeX.SE! What you try so far?
    – Zarko
    Aug 25, 2020 at 12:26
  • Welcome to TeX.SX! Questions about how to draw specific graphics that just post an image of the desired result are really not reasonable questions to ask on the site. Please post a minimal compilable document showing that you've tried to produce the image and then people will be happy to help you with any specific problems you may have. See minimal working example (MWE) for what needs to go into such a document.
    – TobiBS
    Aug 25, 2020 at 12:45
  • would this interest you -- tex.stackexchange.com/a/558838/197451
    – js bibra
    Aug 25, 2020 at 13:15

2 Answers 2


I would suggest using a vector graphics program such as: Inkscape (open source) or Adobe Illustrator (paid). Create there your desired drawing and then include it into LaTeX.

Maybe this can help you: Exporting from Inkscape to LaTeX - via TikZ

  • 1
    Thanks a lot for the help! Aug 25, 2020 at 13:17

Well, using forest package this can be drawn simple:


for tree = {
% nodes
    minimum width=3em,
    math content,
% tree
%    parent anchor=east,
%    child  
    s sep = 12mm,
    l sep = 12mm,
if level = 0{circle,fill, minimum size=0pt, inner sep=2pt}
            {parent anchor=east, child anchor=west},
% edge
    edge = {semithick,-Stealth},
% edge labels
ELA/.style= {edge label={node [pos=0.5, inner sep=2pt,
                              font=\scriptsize\sffamily, sloped,
                              above] {$#1$}}
ELB/.style= {edge label={node [pos=0.5, inner sep=2pt,
                              font=\scriptsize, sloped,
                              below] {$#1$}}
tier/.option=level,     % for aligning nodes to levels
            }% end for tree
    [II, ELA=a
            [IP, name=a1
                [S_H, name=a2, ELA=p_I
                    [R_H, name=a3, ELA=\lambda+\delta]
    [NI, ELB=1-a,
            [CP, name=b1
                [S_L, name=b2, ELB=1-p_c
                    [R_L, name=b3]
\tikzset{every edge/.style = {draw, -Stealth, semithick},
         every edge quotes/.style = {pos=0.7, auto, sloped, font=\scriptsize}
\draw   (b1) edge ["$p_c$"]     (a2)
        (b2) edge ["$\delta$"]  (a3)
        (a1) edge ["$1-p_I$"]     (b2)
        (a2) edge ["$1-\lambda-\delta$"]  (b3);

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .