I'd like to use the tikz package to draw a tree diagram (see my code until now below). My issue is that the nodes all are restricted to their own matrix column, so my diagram becomes too broad to fit on a single page and does not look nice in general. Instead, I'd like the nodes to overlap, e.g. the node on the uppermost level of my diagram should not only be restricted to the 4th column, but also occupy parts of the 3rd and the 5th column. Any ideas how to achieve that?

Just for the sake of clarity, here an image I found online of a tree diagram with overlapping nodes: http://thepeakperformancecenter.com/wp-content/uploads/2017/03/Tree-Diagram.jpg[][1]

And here the code I wrote so far:

  \matrix (m) [
    matrix of nodes,
    column sep=1mm,
    row sep=12mm,
  ] {
          &   &      & Does the wave function collapse? & & &  \\
     &    Is the collapse spontaneous or produced externally? &   & &      & Are there hidden variables? & \\
 Von Neumann & & GRW   &  & Many Worlds & & Bohm \\
    inner sep=.25em,
    line cap=round,
      \path (m-#2) -- node[pos=#1] (tmp) {$#4$} (m-#3);
      \draw (m-#2) -- (tmp) -- (m-#3);
      \LINE      {1-4}{2-2}{Yes}
      \LINE[.7]  {1-4}{2-6}{No}
      \LINE{2-2} {3-1}{External}
      \LINE      {2-2}{3-3}{Spontaneous}
      \LINE      {2-6}{3-5}{Yes}
      \LINE      {2-6}{3-7}{No}

  • 1
    Welcome to TeX SX! The link answers ‘page not found’. Can't you add the image to your post?
    – Bernard
    Jul 18, 2019 at 10:28

1 Answer 1


I'm guessing that you like to have something like this:

enter image description here

This tree is drawn by use of the forest package (dedicated to drawing tree diagrams). I also broke long text in one node into two lines:


    for tree = {draw,
                s sep=5mm,  % horizontal distance between nodes
                l sep=7mm,  % vertical distance between nodes
                EL/.style = {edge label={node[midway, fill=white, inner sep=2pt,
                                              font=\footnotesize\itshape, anchor=center,
                                              text depth=0.3ex]{#1}}, 
                            }% edge labels style
[Does the wave function collapse?
    [Is the collapse spontaneous\\ or produced externally?,EL=Yes
        [Von Neumann,EL=External]
    [Are there hidden variables?,EL=No
        [Many Worlds,EL=Yes]

edit: ups, I forgot on edge labels. Now they are added

edit (2): added missed \documentclass, improved edge labels positioning

  • Yes that's exactly what I was looking for, thanks a lot! Jul 20, 2019 at 15:52

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.