在 TIKZ 中绘制一个带有双向弯曲箭头的轴

在 TIKZ 中绘制一个带有双向弯曲箭头的轴

在此处输入图片描述

我想知道如何在 TIKZ 中绘制类似的东西?我有一个带数字的轴,但我想要字母和箭头……

\documentclass{amsart}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}
\usetikzlibrary{arrows}

\begin{document}

\tikzset{->-/.style={decoration={
  markings,
  mark=at position #1 with {\arrow{<}}},postaction={decorate}}}

\begin{tikzpicture}
% a straight line segment
\draw[latex-] (-2,0) -- (0,0);
\draw[->-=.6] (0,0) -- (1,0);
\draw[-latex] (1,0) -- (2,0);
% the ticks and their labels
\foreach \x  in {-1,...,1}
  \draw[xshift=\x cm] (0pt,2pt) -- (0pt,-1pt) node[below,fill=white] {\the\numexpr\x +1\relax};
\end{tikzpicture}

\end{document}

答案1

在此处输入图片描述

\documentclass[tikz, margin=3mm]{standalone}

\begin{document}
\begin{tikzpicture}[
L/.style={very thick, draw=#1, looseness=2, ->}
                    ]
  \draw[very thick]    (0,0) -- + (7,0);
  \foreach \x in {1,2,...,6}{\coordinate (x\x) at (\x,0);}
  \draw (x1)+(0,1mm) -- + (0,-2mm) node[below] {$s$}
        (x4)+(0,1mm) -- + (0,-2mm) node[below] {$t$};
  \draw[L=orange] (x1) to [out=90, in=90] (x2);
  \draw[L=orange] (x2) to [out=90, in=90] (x3);
  \draw[L=orange] (x3) to [out=90, in=90] (x6);
  \draw[L=blue]   (x6) to [out=90, in=90] (x5);
  \draw[L=blue]   (x5) to [out=90, in=90] (x4);
\end{tikzpicture}
\end{document}

相关内容