如何在 tikz 中绘制带有垂直线和弯曲箭头的矩形?

如何在 tikz 中绘制带有垂直线和弯曲箭头的矩形?

我想要制作一个类似下面的图形:

在此处输入图片描述

我从以下代码开始,但无法成功完成:

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}

\begin{tikzpicture}[x=-1cm, below, minimum height=2em]
\draw (0,0) node{} rectangle (10,1) {};
\node (A) at (10,0) {};
\node (B) at (10,-1) {};
\draw (9,0) -- (9,1);
\draw (8,0) -- (8,1);
\draw (7,0) -- (7,1);
\draw (6,0) -- (6,1);
\path[->,>=stealth'] (B) edge [out=150, in=50] (A);
\end{tikzpicture}

\end{document}

因为输出是这样的:

在此处输入图片描述

答案1

在此处输入图片描述

%STACK OVERFLOW _ MAY 17
%TIKZ
%BASED ON @Ignasi SOLUTION

\documentclass[tikz,border=5pt]{standalone}

\usetikzlibrary{arrows}

%\usetikzlibrary{fit,positioning}



\begin{document}

\begin{tikzpicture}[x=-1cm, below, minimum height=2em]
\draw (0,0) rectangle (10,1);
\draw (9,0) -- (9,1);
\draw (8,0) -- (8,1);
\draw (7,0) -- (7,1);

\draw (6,0) -- (6,1) + (-2,-0.25) node[font=\Huge, align=center] {...};

\draw (1,0) -- (1,1);

\draw[<-,->=stealth'] (10.5,-.5cm) node[left] {a} to[out=0, in=-90] +(-.5,.5);
\draw[<-,->=stealth'] (9.5,-.5cm) node[left] {b} to[out=-0, in=-90] ++(-.5,.5) ;
\draw[<-,->=stealth'] (8.5,-.5cm) node[left] {c} to[out=-0, in=-90] ++(-.5,.5);

\end{tikzpicture}

\end{document} 

答案2

像这样?

在此处输入图片描述

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}

\begin{tikzpicture}[x=-1cm, below, minimum height=2em]
\draw (0,0) rectangle (10,1);
\draw (9,0) -- (9,1);
\draw (8,0) -- (8,1);
\draw (7,0) -- (7,1);
\draw (6,0) -- (6,1);

\draw[<-,>=stealth'] (10,-.5cm) node[left] {a} to[out=0, in=-90] ++(-.5,.5);
\draw[<-,>=stealth'] (9,-.5cm) node[left] {b} to[out=0, in=-90] ++(-.5,.5);
\draw[<-,>=stealth'] (8,-.5cm) node[left] {c} to[out=0, in=-90] ++(-.5,.5);

\end{tikzpicture}

\end{document}

答案3

经过一些努力,我做到了这一点:

\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{arrows}
\begin{document}

\begin{tikzpicture}%[x=-1cm, below, minimum height=2em]
\draw (0,0) node{} rectangle (7,1) {};
\node at (4, .5) {\ldots};
\node (A1) at (0,0) {};
\node (A2) at (1,0) {};
\node (A3) at (2,0) {};
\node (A4) at (3,0) {};
\node (B1) at (-.4,-.7) {};
\node (B2) at (0.6,-.7) {};
\node (B3) at (1.6,-.7) {};
\node (B4) at (2.6,-.7) {};
\draw (1,0) -- (1,1);
\draw (2,0) -- (2,1);
\draw (3,0) -- (3,1);
\draw (6,0) -- (6,1);
\path[->,>=stealth'] (B1) edge[bend right] node [right,label=below left:{$a$}] {} (A1);
\path[->,>=stealth'] (B2) edge[bend right] node [right,label=below left:{$b$}] {} (A2);
\path[->,>=stealth'] (B3) edge[bend right] node [right,label=below left:{$c$}] {} (A3);
\path[->,>=stealth'] (B4) edge[bend right] node [right,label=below left:{$d$}] {} (A4);
\end{tikzpicture}

\end{document}

其结果如下:

在此处输入图片描述

相关内容