This is the first time I use TikZ so please bear with me.
With the following code:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes,positioning,shadows,trees}
\tikzset{
basic/.style = {draw, text width=2cm, drop shadow, font=\sffamily, rectangle},
root/.style = {basic, rounded corners=2pt, thin, align=center,
fill=green!30},
level 2/.style = {basic, rounded corners=6pt, thin,align=center, fill=green!60,
text width=8em},
level 3/.style = {basic, thin, align=left, fill=pink!60, text width=6.5em}
}
\begin{document}
\begin{tikzpicture}[
level 1/.style={sibling distance=40mm},
edge from parent/.style={->,draw},
>=latex]
% root of the the initial tree, level 1
\node[root] {Fuselage}
% The first level, as children of the initial tree
child {node[level 2] (c1) {Functions}}
child {node[level 2] (c2) {Requirements}};
% The second level, relatively positioned nodes
\begin{scope}[every node/.style={level 3}]
\node [below of = c1, xshift=15pt] (c11) {Shell containing payload};
\node [below of = c11] (c12) {Protection against climate};
\node [below of = c12] (c13) {Central structural member};
\node [below of = c13] (c14) {Houses aircraft systems};
\node [below of = c2, xshift=15pt] (c21) {Low drag};
\node [below of = c21] (c22) {Structural};
\node [below of = c22] (c23) {Costs};
\end{scope}
% lines from each level 1 node to every one of its "children"
\foreach \value in {1,...,4}
\draw[->] (c1.195) |- (c1\value.west);
\foreach \value in {1,...,3}
\draw[->] (c2.195) |- (c2\value.west);
\end{tikzpicture}
\end{document}
I get this:
How would I go about adding another set of children nodes to get something like this structure:
Best Answer
As a side note, change from the not so good
of=
syntax to the=of
syntax (from thepositioning
library), as I did in my example code.