[Tex/LaTex] How to draw a bow-tie risk diagram


I'd like to draw some bow-tie diagrams, which are diagrams for modelling risk, particularly for businesses like oil and gas and transport.

In the centre, there is a "top event", and there are zero or more "threats" and "consequences" on the left and right hand sides respectively. The threats and consequences can have zero or more "controls", which stop threats causing the top event, or mitigate the consequences if a top event occurs. The controls can have zero or more "escalation factors", which are child nodes that prevent the control from being effective.

It's a pretty basic qualitative model and rather like a tree. There is proprietory software to draw these models but the images are hideous.

I'm quite new to Tikz but the Tikz manual is a thing of wonder. What is the best way to draw one using Tikz? Should I use a mind map?

Best Answer

There are many options for tree-like diagrams with LaTeX as dirtree, qtree, pst-tree and tikz packages, with or without library trees and others (shape, etc.).

An example with TikZ:



\begin{tikzpicture}[level distance=5em,sibling distance=4em,every node/.style={fill=green!50,rectangle,rounded corners, inner sep=1em}
child[grow=right] {node[fill=cyan!50]{1}
child {node{c}} child {node{b}} child {node{a}}
} % con linea en blanco nuevo child empieza aqui
child[grow=down] { node[fill=cyan!50]{2}
child {node{f}} child {node{e}} child {node{d}}
child[grow=left] { node[fill=cyan!50]{3}
child {node[fill=yellow,circle]{End}} child {node{h}} child {node{g}}
}; %ojo con el punto y coma final