0

I have the following forest in Beamer:

\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);}
  }{},
  [Degredation Modeling
    [Mechanical\\Models]
    [Statistical\\Models
     [Deterministic\\Models]
     [Probabilistic\\Models
     [Continuous\\Distributions]
     [Bayesian\\Models]
     ]
     [Stochastic\\Models
      [Markov Models]
      [Poisson and \\Other Processes]
      ]
     ]
    [Mechanical-Statistical \\Models]
    [Artificial Intelligence\\Models ]
      ]
\end{forest}  
}

What I want to do is, I want to combine the last four leaves in the sublayers of Probabilistic and Stochastic Models, and write the common advantages and disadvantages of the models. How can I do this reverse branching as given below? (It doesn't have to be straight arrows or lines, anything indicating these four nodes also work) enter image description here

4

Like this?

enter image description here

One possibilities are giving names to end nodes (see MWE below) and draw extra node below them and connect this node with named ones.

\documentclass{beamer}
\usepackage[edges]{forest}
\usetikzlibrary{calc}   % <--------


\begin{document}
    \begin{forest}
for tree={
    align=center,
    font=\sffamily,
    forked edge,
    s sep'=2pt,
    l sep'=8pt,
    fork sep'=7pt,
    },
  if level=0{
    inner xsep=0pt,
    tikz={\draw [thick] (.children first) -- (.children last);}
            }{},
[Degredation Modeling
    [Mechanical\\Models]
    [Statistical\\Models
        [Deterministic\\Models]
        [Probabilistic\\Models
            [Continuous\\Distributions, name=a] % <---
            [Bayesian\\Models, name=b] % <---
        ]
         [Stochastic\\Models
            [Markov\\ Models, name=c] % <---
            [Poisson and \\Other Processes, name=d] % <---
         ]
    ]
    [Mechanical-Statistical \\Models]
    [Artificial Intelligence\\Models]
]
\foreach \i in {a,...,d}    % <---------
\draw[semithick]  
    (\i) -- ($(a)!0.5!(d) + (0,-1.5)$) 
    node[below, align=center] {They are acurate,\\
                               but require data, etc} ; 
\end{forest}
\end{document}

Edit: MWE is now adopted to beamer document class.-

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.