1

I want to draw the array in the picture with a cell outside, the arrows, the border and some cells coloured. Could you please tell me how? enter image description here

  • 1
    Welcome to TeX.SX! Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}. –  Dec 13 '14 at 15:58
  • http://www.texample.net/tikz/examples/tag/diagrams/ or http://www.texample.net/tikz/examples/feature/chains/ – Sigur Dec 13 '14 at 16:18
  • http://tex.stackexchange.com/questions/203257/tikz-chains-with-one-side-of-the-leftmost-node-thickbold might be helpful. – cfr Dec 13 '14 at 23:14

1 Answers1

3

Next time, please provide a Minimum Working Example. Here is a beginning...

\documentclass[tikz]{standalone}
\usetikzlibrary{chains, positioning, arrows.meta, bending, shapes.arrows}

\begin{document}
\begin{tikzpicture}
  [
    -{Stealth[length=2.5pt]},
    every node/.style={draw, text width=25pt, text centered},
    my arrow/.style={shape=single arrow, rotate=90, inner sep=1pt, outer sep=0pt, single arrow head extend=1pt, minimum height=7.5pt, text width=0pt, draw=blue!50, fill=blue!25}
  ]
  \begin{scope} [start chain, node distance=0pt]
    \node [on chain] (2) {2};
    \node [on chain] (4) {4};
    \node [on chain] (1 phantom) {\phantom{1}};
    \node [on chain] (3) {3};
  \end{scope}
  \node (1) [below=15pt of 1 phantom] {1};
  \draw (1 phantom.south) -- (1.north);
  \draw (2.north) [out=25, in=155] to (4.north);
  \draw (4.north) [out=25, in=155] to (1 phantom.north);
  \node [below=2.5pt of 2.south, anchor=east, my arrow] {};
  \node [below=2.5pt of 3.south, anchor=east, my arrow] {};
\draw [draw=yellow, thick, opacity=.75] (4.south east) +(0,-2.5pt) -- (4.north east) -- +(0,2.5pt);
\end{tikzpicture}
\end{document}

ticker tape

cfr
  • 198,882