# Lining up edges of a tree with TikZ

I'm drawing trees with TikZ and

\begin{tikzpicture}
\node {$C$}
child[missing]
child{node {$i$}
child[missing]
child{node {$j$}}
};
\end{tikzpicture}

produces edges that don't line up as I want them to. If I were to draw circles around the nodes, an edge goes from the bottom center of the parent's circle to the top center of the child's, making the arm appear jagged. I've tried moving the anchors around, but that wasn't it. What I want seems to occur automatically in the examples in the pgf manual (see the final tree example on page 192). What am I not doing?

-
Could you please add a picture of what you are trying to achieve. –  Caramdir Sep 30 '10 at 22:55

Not quite sure what's going on here. Have you altered the default parent and child anchors?

Here are 3 examples:

\begin{tikzpicture}[parent anchor=south,child anchor=north,every  node/.style={circle,draw}]
\node {$C1$}
child[missing]
child{node {$i$}
child[missing]
child{node {$j$}}
};
\end{tikzpicture}
\begin{tikzpicture}[parent anchor=center,child anchor=center,every  node/.style={circle,draw}]
\node {$C2$}
child[missing]
child{node {$i$}
child[missing]
child{node {$j$}}
};
\end{tikzpicture}
\begin{tikzpicture}[every node/.style={circle,draw}]
\node {$C3$}
child[missing]
child{node {$i$}
child[missing]
child{node {$j$}}
};
\end{tikzpicture}


which produce:

Now, your example (my C3) appears to be the best; is it C1 you're looking for?

-
I wanted C3, but was getting C1 with the same code. For whatever reason, deleting \usetikzlibrary{tikz-qtrees} (which I don't need--it was left from an earlier tree-drawing experiment) solves the problem. I assume it changes the anchors. –  hoyland Oct 2 '10 at 0:49