.png)
私は次の TEX コードに取り組んでいます:
\begin{tikzpicture}[x=7mm]
\draw[->] (0,0) -- (11,0);
\foreach \x in {0,...,10}
{
\draw[shift={(\x,0)}]
(0pt,3pt) -- (0pt,-3pt) node[below,font=\small] {$\x$};
}
%\node[below] at (-5.8,-5pt) {$\cdots$};
\node[below] at (11,-5pt) {$\cdots$};
\end{tikzpicture}
これにより、次の図が得られます。
この tikz 画像の上部に、各ノード $i$ からノード $i+1$ への曲線矢印 (それぞれに「+1」というラベルが付けられている) を描くにはどうすればよいでしょうか。
答え1
答え2
答え3
別のアプローチ。
\documentclass[tikz,border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}[x=7mm]
\draw[->] (0,0) -- (11,0);
\foreach \x in {0,...,10}
{
\draw[shift={(\x,0)}]
(0pt,3pt) -- (0pt,-3pt) node[below,font=\small] {$\x$};
}
\node[below] at (11,-5pt) {$\cdots$};
% Draw curved arrows with labels
\foreach \x in {0,...,9}
{
\draw[->, bend left=30, cyan] (\x,0.2) to node[below,font=\small, cyan] {$\scriptscriptstyle +1$} (\x+1,0.2);
}
\end{tikzpicture}
\end{document}