I have been struggling a bit with TikZ and how to build trees. What I need now is some advice on how to improve the node placement. Right now I have these 2 trees:
\documentclass[a4paper,10pt]{article}
\usepackage{tikz}
\usetikzlibrary{positioning,shadows,arrows,trees,shapes,fit}
\begin{document}
\begin{tikzpicture}
[font=\small, edge from parent fork down,
every node/.style={top color=white, bottom color=blue!25,
rectangle,rounded corners, minimum size=6mm, draw=blue!75,
very thick, drop shadow, align=center},
edge from parent/.style={draw=blue!50,thick},
level 1/.style={sibling distance=6cm},
level 2/.style={sibling distance=2.5cm},
level 3/.style={sibling distance=2.5cm},
level distance=2cm,
]
\node {Paletizar} % root
child { node {Iniciar}
child { node {Detectar Pacote}}
child { node {Movimentar}}
}
child { node {Empacotar}
child { [sibling distance=15mm] node {Posicionar}
child { node {Pegar/Largar}}
child { node {Organizar}}
child { node {Movimentar}}
}
child { node {Agrupar}}
child { node {Padronizar}}
}
child { node {Finalizar}
child { node {Detectar estado\\da palete}}
child { node {Transmitir}}
};
\end{tikzpicture}
\vspace{2cm}
\begin{tikzpicture}
[font=\small, edge from parent fork down,
every node/.style={top color=white, bottom color=blue!25,
rectangle,rounded corners, minimum size=6mm, draw=blue!75,
very thick, drop shadow, align=center},
edge from parent/.style={draw=blue!50,thick},
level 1/.style={sibling distance=6cm},
level 2/.style={sibling distance=3cm},
level 3/.style={sibling distance=2cm},
level distance=2cm,
]
\node {Paletizador} % root
child { node {Inicialização\\de sistema}
child { node {Sensor X}}
child { node {Acção Y}}
}
child { node {Sacos}
child { node {Linha/Coluna}
child { node {Garra}}
child { node {Rodar Garra}}
child { node {Acção Y2}}
}
child { node {Euro Pallet}}
child { node {Disposição $xyz$}
child { node {$x=?$}}
child { node {$y=?$}}
child { node {$z=?$}}
}
}
child { node {Sistema de despacho}
child { node {Sensor de peso\\/contador}}
child { node {Tapete rolante\\de saída}}
};
\end{tikzpicture}
\end{document}
So basically what I want is a way to edit the code I have so that everything is perceptible which basically means that I need specific sibling distances to each child. I have tried to add a sibling distance in the child nodes but maybe it was in the wrong place or something else because it didn't change anything. I also tried to use below and all its derivations but the results were even worse because of the size of the boxes.
Best Answer
Using
tikz-qtree
helps a bit with automatic spacing of siblings. It also provides a simpler input method. Here's your second tree done in that way: