在 TikZ 中,如何沿圆圈放置带有标签的箭头?

在 TikZ 中,如何沿圆圈放置带有标签的箭头?

在下图中,如何添加带有标签的红色箭头?

在此处输入图片描述

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{patterns,shapes.misc}

\tikzset{
    cross/.style={path picture={\draw[black]
        (path picture bounding box.south east) -- (path picture bounding box.north west)
        (path picture bounding box.south west) -- (path picture bounding box.north east);}}
}

\begin{document}
\begin{tikzpicture}

    \def\radius{1}

    \node at (-2.2*\radius,0) {$\displaystyle \partial_k \Gamma_k \; = \; \frac{1}{2}$};

    \draw[thick] (0,0) circle (\radius);
    \draw[fill=white,cross] (-\radius,0) circle (0.2*\radius) node[right=4] {$\partial_k R_k$};

    \draw[fill=white,postaction={pattern=north east lines}] (\radius,0) circle (0.25*\radius) node[right=4] {$\bigl[\Gamma_k^{(2)} + R_k\bigr]^{-1}$};

\end{tikzpicture}
\end{document}

答案1

一种可能性是使用一个装饰作为箭头尖端,并使用两个节点作为标签。

在此处输入图片描述

\documentclass{standalone}

\usepackage{tikz}
\usetikzlibrary{patterns,shapes.misc,decorations.markings}

\tikzset{
    cross/.style={path picture={\draw[black]
        (path picture bounding box.south east) -- (path picture bounding box.north west)
        (path picture bounding box.south west) -- (path picture bounding box.north east);}}
}

\begin{document}
\begin{tikzpicture}[decoration={
  markings,
  mark=at position 0.45 with \arrow[red]{>},
  mark=at position 0.55 with \arrowreversed[red]{>}
}]

    \def\radius{1}

    \node at (-2.2*\radius,0) {$\displaystyle \partial_k \Gamma_k \; = \; \frac{1}{2}$};

    \draw[thick,postaction={decorate}] (0,0) circle (\radius);
    \node[above left,red] at (360*0.45:\radius) {$-p$};
    \node[below left,red] at (360*0.55:\radius) {$p$};
    \draw[fill=white,cross] (-\radius,0) circle (0.2*\radius) node[right=4] {$\partial_k R_k$};

    \draw[fill=white,postaction={pattern=north east lines}] (\radius,0) circle (0.25*\radius) node[right=4] {$\bigl[\Gamma_k^{(2)} + R_k\bigr]^{-1}$};

\end{tikzpicture}
\end{document}

答案2

在此处输入图片描述

另一种可能性是使用弯曲边缘:

\documentclass[tikz, margin=2mm]{standalone}
\usetikzlibrary{patterns, positioning}

\newcommand\ppbb{path picture bounding box}

\begin{document}
\begin{tikzpicture}[
node distance = 22mm,
C/.style = {circle, draw, minimum size=5mm,
            path picture={\draw (\ppbb.north west) edge (\ppbb.south east)
                                (\ppbb.south west)   --  (\ppbb.north east);}
            },
P/.style = {circle, draw, minimum size=5mm,
            pattern=north east lines}
                    ]
\node (n1) [C,label=left: {$\partial_k\Gamma_k=\frac{1}{2}$},
              label=right:{$\partial_k R_k$}] {};
\node (n2) [P,right=of n1,
              label=right:{$\bigl[\Gamma_k^{(2)} + R_k\bigr]^{-1}$}] {};
%
\draw[->] (n2) to [out= 100, in= 80, looseness=1.5] (n1) node[above left] {$-p$};
\draw[->] (n2) to [out=-100, in=-80, looseness=1.53] (n1) node[below left] {$ p$};
\end{tikzpicture}
\end{document}

相关内容