1

Tree with branches up and down

Hi

I want to draw a tree like in the image, with branches growing up and down from the root(nature), also I need to put a pay-off at the end of each node and labels in each edge parent node. Also I need to draw a dashed line between the two largest levels. Thank you for the help!

2
  • Welcome to TeX.SX! You can have a look at our starter guide to familiarize yourself further with our format.
    – yo'
    Nov 27, 2014 at 15:25
  • This is more a graph than a tree...
    – cfr
    Nov 28, 2014 at 0:20

1 Answer 1

9

This requires TikZ v3.00 and to be compiled with LuaLaTeX. Remaining details can be found in the TikZ manual graphdrawing library section.

\documentclass[tikz]{standalone}
\usetikzlibrary{graphs, graphdrawing}
\usegdlibrary{force}
\begin{document}
\begin{tikzpicture}[every node/.style={inner sep=1pt}]
\graph [spring electrical layout] {
  /[inner sep=0,outer sep=0,electric charge=2]
  -- {b, c, d, e-- {g,h}, f--{i,j},m,n};
};
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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