6

I need that red edges become arrows, I use \draw[->] but the end of the drawn line is the same as the beginning, this is not an arrow!

This is my code:

\documentclass[demo]{article}
\usepackage{tikz,tikz-qtree}

\begin{document}
\begin{figure}[ht]\begin{center}\begin{tikzpicture}[grow'=up]
\Tree [.\node(8){8}; 
       [.\node(5){5}; 
              [.\node(3){3}; 
                 \node(1){1}; 
                 \node(4){4}; ]
                \node(6){6}; ] 
             \node(12){12}; ]
\begin{scope}[shift={(2in,0)}]
\Tree [.\node(H){H}; 
       [.\node(E){E}; 
              [.\node(C){C}; 
                 \node(A){A}; 
                 \node(D){D}; ]
                \node(F){F}; ] 
             \node(O){O}; ]
\end{scope}
\draw[->,thick,red](8)  to[out=315,in=225] node[below]{g} (H);
\draw[->,thick,red](12) to[out=315,in=225] node[below]{g} (O);
\draw[->,thick,red](5)  to[out=315,in=225] node[below]{g} (E);
\draw[->,thick,red](3)  to[out=315,in=225] node[below]{g} (C);
%etc...
\end{tikzpicture}\end{center}\end{figure}
\end{document}

and this is the image produced: enter image description here

  • This \draw[thick,red](8) to[->,out=315,in=225] node[below]{g} (H); doesn't work. – Alberto Feb 18 '12 at 15:53
  • 3
    With your code, I do get the arrows. – user10274 Feb 18 '12 at 15:54
  • 2
    Indeed, with your code, I also get the arrows. Maybe needs to be compiled a few times. I've deleted my previous comments since they are misleading. – percusse Feb 18 '12 at 15:56
  • No problem here with pgf 2.1 cvs and the last qtree (engine pdftex) – Alain Matthes Feb 18 '12 at 16:23
  • I use pdflatex by MiKTeX (Windows) – Alberto Feb 18 '12 at 17:55