我有一张树形变换的图片,可以直观地看到旋转。我想强调节点上方(Qx)
或分支上的箭头=>
。代码如下:
\begin{tikzpicture}
\begin{scope}
\node{$\Rightarrow$}
child {node {$Qx$}
child {node{$\psi$}}
}
child {node {$\vartheta$}
};
\end{scope}
\draw[->] (2.5,-1) -- (3.5,-1);
\begin{scope}[xshift=6cm]
\node{$(\overline{Q}x)$}
child {node {$\Rightarrow$}
child {node {$\psi$}}
child {node {$\vartheta$}}
};
\end{scope}
\end{tikzpicture}
答案1
\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta,bending,calc}
\begin{document}
\begin{tikzpicture}[>={Stealth[bend]}]
\begin{scope}
\node{$\Rightarrow$}
child {node (Qx){$Qx$}
child {node{$\psi$}}
}
child {node (theta) {$\vartheta$}
};
\draw[red,->] ($(Qx)+(-1em,0)$) arc[start angle=180,end angle=70,radius=1em];
\draw[blue,->] ($($(Qx)!0.5!(theta)$)+(150:1em)$)
arc[start angle=150,end angle=30,radius=1em];
\end{scope}
\draw[->] (2.5,-1) -- (3.5,-1);
\begin{scope}[xshift=6cm]
\node{$(\overline{Q}x)$}
child {node {$\Rightarrow$}
child {node {$\psi$}}
child {node {$\vartheta$}}
};
\end{scope}
\end{tikzpicture}
\end{document}