http://www.texample.net/tikz/examples/tree/
Which i've used to build my own tree, but i have some problems with the length of the branch being the samme for all of them, thereby making some of the leaves overlap..
as seen here:
Code: Select all
% A simple Tree
% Author: Stefan Kottwitz
\documentclass[border=10pt]{standalone}
%%%<
\usepackage{verbatim}
%%%>
\begin{comment}
:Title: A simple Tree
:Tags: Trees;Cookbook
:Author: Stefan Kottwitz
:Slug: tree
A simple tree with a style for all nodes.
\end{comment}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}[sibling distance=15em,
every node/.style = {shape=rectangle, rounded corners,
draw, align=center,
top color=white, bottom color=blue!20}]]
\node {Sentence}
child { node {W1}
child { node {M1}
child { node {P1}}
child { node {P2}}}
child { node {M2}
child { node {P1}}
child { node {P2}}}}
child { node {W2}
child { node {M1}
child { node {P1} }}}
child { node {W3}
child { node {M1} }
child { node {M2} }};
\end{tikzpicture}
\end{document}
How do fix the overlapping leaves, or how do set the length for the branches individually...