I am using tikz to create a plot. I get the following error: Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrentname ', to which you passed 'at position 1 with {\arrow [scale =50]}', and I am going to ignore it. Perhaps you misspelled it, at several places (\foreach ... (\x, 2.7) -- (\x, 1.7)
. How do I solve it?
\documentclass[letterpaper,12pt]{article}
\usepackage{tikz}
\usetikzlibrary{arrows,snakes,backgrounds}
\usetikzlibrary{shapes.geometric}
\usepackage{xcolor}
\usetikzlibrary{positioning}
\begin{document}
\begin{figure}[!hbt]
\centering
\centering
\begin{tikzpicture}
\tikzstyle{grid} = [rectangle, rounded corners, minimum width=13cm, minimum height=9cm,text centered, draw=black, fill=green!30]
\tikzstyle{block} = [rectangle, rounded corners, minimum width=3cm, minimum height=3cm,text centered, draw=black, fill=blue!30]
\node (grid) [grid, align=left] {};
\node (t1) at (-5.5,4) {\color{purple}Grid};
\node (b1) at (-4.5,2.0)[block]{};
\node (t2) at (-4.5,3.1) {\color{red}Block (0, 0)};
\foreach \x in {-5.7,-5.5, -5.3, -5.1, -4.9, -4.7, -4.5, -4.3, -4.1, -3.9,-3.7,-3.5,-3.3}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x, 2.7) -- (\x, 1.7);
\foreach \x in {-5.7,-5.5, -5.3, -5.1, -4.9, -4.7, -4.5, -4.3, -4.1, -3.9,-3.7,-3.5,-3.3}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x, 1.5) -- (\x, 0.5);
\node (b2) [block, right=0.3cm of b1]{};
\node (t3) at (-1.3, 3.1) {\color{red} Block (0, 1)};
\foreach \x in {-2.4, -2.2, -2.0, -1.8,-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.0}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,2.7) -- (\x,1.7);
\foreach \x in {-2.4, -2.2, -2.0, -1.8,-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.0}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,1.5) -- (\x,0.5);
\node[draw=none] (ellipsis1) at (1.5cm,2.0cm) {\Huge$\cdots$};
\node (b3) [block, right=2.3cm of b2]{};
\node (t4) at (4.1, 3.1) {\color{red}Block (0, m)};
\foreach \x in {5.3, 5.1, 4.9, 4.7,4.5,4.3,4.1,3.9,3.7,3.5,3.3,3.1,2.9}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,1.5) -- (\x,0.5);
\foreach \x in {5.3, 5.1, 4.9, 4.7,4.5,4.3,4.1,3.9,3.7,3.5,3.3,3.1,2.9}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,2.7) -- (\x,1.7);
\node[draw=none,minimum width=2cm,minimum height=5cm] (ellipsis2) at (-4.5cm,-0.5cm) {\Huge$\vdots$};
\node[draw=none,minimum width=2cm,minimum height=5cm] (ellipsis2) at (-1.0cm,-0.5cm) {\Huge$\vdots$};
\node[draw=none,minimum width=2cm,minimum height=5cm] (ellipsis2) at (1.3cm,-0.5cm) {\Huge$\ddots$};
\node[draw=none,minimum width=2cm,minimum height=5cm] (ellipsis2) at (4.0cm,-0.5cm) {\Huge$\vdots$};
\node (b4) at (-4.5,-2.8)[block]{};
\node (t5) at (-4.5, -1.7) {\color{red}Block (n, 0)};
\foreach \x in {-5.7,-5.5, -5.3, -5.1, -4.9, -4.7, -4.5, -4.3, -4.1, -3.9,-3.7,-3.5,-3.3}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-2.0) -- (\x,-3.0);
\foreach \x in {-5.7,-5.5, -5.3, -5.1, -4.9, -4.7, -4.5, -4.3, -4.1, -3.9,-3.7,-3.5,-3.3}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-3.2) -- (\x,-4.2);
\node (b5) [block, right=0.3cm of b4]{};
\node (t6) at (-1.3, -1.7) {\color{red}Block (n, 1)};
\foreach \x in {-2.4, -2.2, -2.0, -1.8,-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.0}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-2.0) -- (\x,-3.0);
\foreach \x in {-2.4, -2.2, -2.0, -1.8,-1.6,-1.4,-1.2,-1.0,-0.8,-0.6,-0.4,-0.2,0.0}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-3.2) -- (\x,-4.2);
\node (b6) [block, right=2.3cm of b5]{};
\node (t4) at (4.1, -1.7) {\color{red}Block (0, m)};
\foreach \x in {5.3, 5.1, 4.9, 4.7,4.5,4.3,4.1,3.9,3.7,3.5,3.3,3.1,2.9}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-2.0) -- (\x,-3.0);
\foreach \x in {5.3, 5.1, 4.9, 4.7,4.5,4.3,4.1,3.9,3.7,3.5,3.3,3.1,2.9}
\draw [->,>=stealth, ultra thick,decorate,decoration={snake,amplitude=.8mm,segment length=3mm,post length=1mm,mark=at position 1 with {\arrow[scale =50]}}]
(\x,-3.2) -- (\x,-4.2);
\node[draw=none] (ellipsis2) at (1.5cm,-3.0cm) {\Huge$\cdots$};
\end{tikzpicture}
\end{figure}
\end{document}
mark=at position 1 with {\arrow[scale =50]}
?mark=at position 1 with {\arrow[scale =50]}
. It works now.