TikZ Trees – Drawing Tree Using TikZ with Child Overlap

tikz-pgftikz-qtreetikz-trees

I am trying to draw a tree but unfortunately i have some childs overlap each other,I increased the sibling distance , even i have used the option scale but i have the same problem. here is my code :

\documentclass[openright,a4paper,11pt,french]{report}

\usepackage{tikz}
\usetikzlibrary{arrows,positioning,automata,shadows,fit,shapes}

\begin{document}

\begin{tikzpicture} [scale=.6]
\tikzstyle{level 1}=[sibling distance=60mm] 
\tikzstyle{level 2}=[sibling distance=30mm] 
\tikzstyle{level 3}=[sibling distance=20mm] 

 \node{country}  
   child{node{name}child{node{ France }}}
   child{ node{city}child{node{ Paris }}}
  child{ node{region}child{node{name}child{node{ Nord-Pas De Calais }}}child{node{population}child{node{ 3996 }}}
  child{node{city}child{node{ Lille }}}}child{node{region}child{node{name}child{node{ Valle du Rhone }}}child{node{city}child{node{ Lyon }}}child{node{city}child{node{ Valence }}}}; 
 \end{tikzpicture}
  \end{document}

and the result is

enter image description here

Best Answer

Maybe not as nice looking a tree, but a lot faster to input. The tikz-qtree package is designed to optimize the spacing between nodes.

\documentclass{article}
\usepackage{tikz-qtree,tikz-qtree-compat}
\begin{document}
\begin{tikzpicture}[level 1/.style={level distance=1.5cm}]
\Tree
[.country 
  [.name France ] [.city Paris ] [.region 
                      [.name {Nord-Pas de Calais} ] 
                      [.population 3996 ] 
                      [.city Lille  ]
                   ] 
                   [.region 
                       [.name {Valle du Rhone } ] 
                      [.city Lyon ] 
                      [.city Valence ]
                  ]
]
\end{tikzpicture}
\end{document}

output of code

Related Question