我需要红色边缘变成箭头,我用\draw[->]
但是画出的线的末端与开头相同,这不是箭头!
这是我的代码:
\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}
生成的图像如下: