# TikZ: Transitioning from snakes to decorations

I'm trying to change a tikz-picture so it does not show a warning upon compilation.

Minimal working example:

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{snakes}
%\usetikzlibrary{decorations.pathmorphing}

\begin{document}
\begin{tikzpicture}

\node[circle,draw] (S) at (0,0) {S};
\draw[snake=expanding waves,segment angle=25] (S)   -- (3,3);
%\draw[decorate,decoration={expanding waves,angle=25}] (S) -- (3,3);
\end{tikzpicture}
\end{document}


However, when I remove the snakes-code and uncomment the decoration-based code, i get an error saying

Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrentname ' and I am going to ignore it. Perhaps you misspelled it.

Now I checked both the examples from the manual as well as several related answers on this SE, none of which seemed to work for me.

In this question, the only difference is that the decoration is used on a \path command instead of a \draw. I tried that, and it didn't work for me. Another answer suggests adding the correct sublibrary, which I would identify as decorations.pathmorphing, and trying this did not help either. Is there a general way (e.g. reading documentation) to tell which tikz-library or sublibrary has to be added to the document?

I find this problem rather frustrating, since the code that works for me without a visible downside (although I know that the snakes library is deprecated), and the supposedly optimal example code does not work at all. How can I solve this problem?

I noticed another similar question was closed for being too localized. If this should be the case for my question as well, how can I get help for this instead?

The expanding waves are in the pathreplacing library, not pathmorphing, see page 581 of the documentation.

\documentclass[tikz,border=10pt]{standalone}
\usetikzlibrary{decorations.pathreplacing}

\begin{document}
\begin{tikzpicture}
\node[circle,draw] (S) at (0,0) {S};
\draw[decoration={expanding waves,angle=25},decorate] (S) -- (3,3);
\end{tikzpicture}
\end{document}


• Cool, I did not see that! Thank you for answering so fast! – Jonas Schwarz Dec 16 '18 at 14:52