I am trying to draw a decision tree. I have gotten very close to the end result with this:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{trees,shapes,snakes}
\begin{document}
\tikzstyle{level 1}=[level distance=1.5cm, sibling distance=2.5cm]
\tikzstyle{level 2}=[level distance=1cm, sibling distance=2cm]
\tikzstyle{level 3}=[level distance=1cm, sibling distance=1.5cm]
\tikzstyle{bag} = [rectangle, text width=4em, text centered, draw]
\tikzstyle{decision} = [rectangle, minimum height=8pt, minimum width=8pt, fill, inner sep=0pt]
\tikzstyle{choice} = [circle, minimum width=8pt, fill, inner sep=0pt]
\tikzstyle{end} = [regular polygon, regular polygon sides=3, minimum width=8pt, fill, inner sep=0pt]
\begin{tikzpicture}[grow=right,child anchor=west]
\tiny
\node[bag]{Decision}
child {
node[decision]{}
child {
node[bag]{Option 1}
child{
node[choice]{}
child {
node[bag]{Outcome 1}
child {
node[end]{}
}
}
child {
node[bag]{Outcome 2}
child {
node[end]{}
}
}
}
}
child {
node[bag]{Option 2}
child{
node[choice]{}
child {
node[bag]{Outcome 3}
child {
node[end]{}
}
}
child {
node[bag]{Outcome 4}
child {
node[end]{}
}
}
}
}
};
\end{tikzpicture}
\end{document}
The only issue I'm having is that I cannot find a way to rotate the last node (end), shaped as a triangle, as it should point towards its parent, not upwards. Any ideas?