TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As I explored the TikZ manual and available examples; the position of child nodes are defined within the parent node. This means that all child nodes spread on the same radius from the parent with constant angle intervals.

How to define the level dsiatance and sibling angle individually for each child node?

\node[ball color=red,circle] (parent) at (5,5) {Parent}
    [level distance=4cm,sibling angle=30,clockwise from=0]
    child {node[rectangle,fill=red,color=white]
    {e.g. 2cm from parent at angle 0}}
    child {node[rectangle,fill=red,color=white]
    {e.g. 5cm from parent at angle 20}}
    child {node[rectangle,fill=red,color=white]
    {e.g. 3cm from parent at angle 60}};

Instead of constant distance from parent and equal angle between child nodes defined in

[level distance=4cm,sibling angle=30,clockwise from=0]

How to define a custom (independent) value for each child?

share|improve this question
Can you post the "full" code? I mean, adding the preamble and the closing tags. – Alenanno Jun 4 '12 at 9:14
As Alenanno said, it would be good if you could always post full examples, including the \documentclass and the necessary libraries. It seems like a trivial thing for examples like these, but if you already include the necessary lines, it saves everyone else the work of having to add them themselves (and wondering why the example doesn't compile, until they figure out that the trees library needs to be loaded). – Jake Jun 4 '12 at 9:25
@Jake you're quite right! I will keep it in mind for future questions. – All Jun 4 '12 at 9:29
up vote 6 down vote accepted

You can pass the level distance and sibling angle options to the child keywords:


\node[ball color=red,circle] (parent) at (5,5) {Parent}
    [clockwise from=0]
    child [level distance=2cm] {node[rectangle,fill=red]
    child [level distance=4cm, sibling angle=20] {node[rectangle,fill=red]
    child [level distance=3cm, sibling angle=30] {node[rectangle,fill=red]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.