5

When compiling the following code, I get the following message: Snakes have been superseded by decorations. Please use thedecoration libraries instead of the snakes library. I've been searching how to replace the snake=expanding waves in lines 35, 37 and 39 with the decorations library but could not find it.

\documentclass[a4paper,10pt]{scrartcl} 
\usepackage{tikz}
\usetikzlibrary{calc,shapes.geometric,positioning,snakes}
\begin{document}
\begin{figure}
    \begin{tikzpicture}
        \begin{scope}[shift={(.37,0)}]
            \coordinate (csc1) at (180:3.5);
            \coordinate (csc2) at (330:3.5);
            \coordinate (csc3) at (300:3.5);
            \coordinate (csc4) at (270:3.5);
            \coordinate (csc5) at (240:3.5);        
            \coordinate (csc6) at (210:3.5);        
            \coordinate (info) at (135:3.5);
        \end{scope}
        \node (sc1) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc1) {};
        \node (sc2) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc2) {};
        \node (sc3) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc3) {};
        \node (sc4) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc4) {};
        \node (sc5) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc5) {};
        \node (sc6) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc6) {};
        \node (infonode) [align=center,fill,ellipse,color=yellow!50,opacity=.5,minimum height=1.5cm,minimum width=0.5cm,rotate=324,label=Info] at (info) {};
        \node (cp1) [align=center,fill,color=gray!50,label=below:CP,right=2cm of info,minimum height=.8cm] {};
        \node (cp2) [align=center,fill,color=gray!50,label=below:CP,right=1.1cm of cp1,minimum height=.8cm] {};
        \node (cp3) [align=center,fill,color=gray!50,label=below:CP,right=1.1cm of cp2,minimum height=.8cm] {};
        \node (cpexit) [align=center,fill,color=gray!50,label={[align=center]Exit\\Turnstile},right=1.1cm of cp3,minimum height=.8cm] {};
        \node (fake) [right=1cm of cp3] {};
        \draw (5.2,-4.5) -- (5.2,6);
        \draw (-4.5,-4.5) .. controls (-4.2,3) and (0,4) .. (0,6);
        \draw (infonode) -- (cp1);
        \node (mi1) at ($(cp1) !0.5! (cp2)$) {};
        \node (mi2) at ($(cp2) !0.5! (cp3)$) {};        
        \node (mi3) at ($(cp3) !0.5! (fake)$) {};
        \node (cam1) [above= 0mm of cp1,label=cam,circle,color=green,fill] {};
        \path (cam1) edge [snake=expanding waves,segment length=1mm,segment angle=30,draw,color=green] (mi1);
        \node (cam2) [above= 0mm of cp2,label=cam,circle,color=green,fill] {};
        \path (cam2) edge [snake=expanding waves,segment length=1mm,segment angle=30,draw,color=green] (mi2);
        \node (cam3) [above= 0mm of cp3,label=cam,circle,color=green,fill] {};
        \path (cam3) edge [snake=expanding waves,segment length=1mm,segment angle=30,draw,color=green] (mi3);
        \node (waiting) at ($(5.2,6) !0.5! (0,6)$) {Waiting Area};
        \node (Entry) at ($(5.2,-4.5) !0.5! (-4.5,-4.5)$) {Entry/Shop};
    \end{tikzpicture}
\end{figure}
\end{document}
6

The snake=<name> is an unfortunate coincidence that it actually works. It's indeed not the correct syntax, not to mention it has been deprecated anyways.

Instead by adding the decorations.pathmorphing library, you can use it via the keys

decoration={expanding waves,angle=30,segment length=1mm},decorate,

Full code

\documentclass[tikz]{standalone}
\usetikzlibrary{calc,shapes.geometric,positioning,decorations.pathmorphing}
\begin{document}
    \begin{tikzpicture}
        \begin{scope}[shift={(.37,0)}]
            \coordinate (csc1) at (180:3.5);
            \coordinate (csc2) at (330:3.5);
            \coordinate (csc3) at (300:3.5);
            \coordinate (csc4) at (270:3.5);
            \coordinate (csc5) at (240:3.5);        
            \coordinate (csc6) at (210:3.5);        
            \coordinate (info) at (135:3.5);
        \end{scope}
        \foreach \x in {1,...,6}{
        \node (sc\x) [align=center,fill,circle,color=yellow!50,opacity=.5,label=SCO] at (csc\x) {};
        }
        \node (infonode) [align=center,fill,ellipse,color=yellow!50,opacity=.5,minimum height=1.5cm,minimum width=0.5cm,rotate=324,label=Info] at (info) {};
        \node (cp1) [align=center,fill,color=gray!50,label=below:CP,right=2cm of info,minimum height=.8cm] {};
        \node (cp2) [align=center,fill,color=gray!50,label=below:CP,right=1.1cm of cp1,minimum height=.8cm] {};
        \node (cp3) [align=center,fill,color=gray!50,label=below:CP,right=1.1cm of cp2,minimum height=.8cm] {};
        \node (cpexit) [align=center,fill,color=gray!50,label={[align=center]Exit\\Turnstile},right=1.1cm of cp3,minimum height=.8cm] {};
        \node (fake) [right=1cm of cp3] {};
        \draw (5.2,-4.5) -- (5.2,6);
        \draw (-4.5,-4.5) .. controls (-4.2,3) and (0,4) .. (0,6);
        \draw (infonode) -- (cp1);
        \node (mi1) at ($(cp1) !0.5! (cp2)$) {};
        \node (mi2) at ($(cp2) !0.5! (cp3)$) {};        
        \node (mi3) at ($(cp3) !0.5! (fake)$) {};
        \node (cam1) [above= 0mm of cp1,label=cam,circle,color=green,fill] {};
        \path (cam1) edge [decoration={expanding waves,angle=30,segment length=1mm},decorate,draw,color=green] (mi1);
        \node (cam2) [above= 0mm of cp2,label=cam,circle,color=green,fill] {};
        \path (cam2) edge [decoration={expanding waves,angle=30,segment length=1mm},decorate,draw,color=green] (mi2);
        \node (cam3) [above= 0mm of cp3,label=cam,circle,color=green,fill] {};
        \path (cam3) edge [decoration={expanding waves,angle=30,segment length=1mm},decorate,,draw,color=green] (mi3);
        \node (waiting) at ($(5.2,6) !0.5! (0,6)$) {Waiting Area};
        \node (Entry) at ($(5.2,-4.5) !0.5! (-4.5,-4.5)$) {Entry/Shop};
    \end{tikzpicture}
\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.