ライブラリが必要です。
\usetikzlibrary{decorations.markings,decorations.pathmorphing}
\begin{document}
\begin{tikzpicture}
\draw[decorate,decoration={coil}] (0,3) -- (0,-3);
\end{tikzpicture}
\end{document}
coil
にオプションをつけることができます。amplitude
, segment length
, aspect
amplitudeの違い
\begin{tikzpicture}
\draw[decorate,decoration={coil,amplitude=2cm}] (-3,3) -- (-3,-3);
\draw[decorate,decoration={coil,amplitude=3.5cm}] (0,3) -- (0,-3);
\draw[decorate,decoration={coil,amplitude=5cm}] (3,3) -- (3,-3);
\end{tikzpicture}
segment lengthの違い
\begin{tikzpicture}
\draw[decorate,decoration={coil,segment length=5}] (-3,3) -- (-3,-3);
\draw[decorate,decoration={coil,segment length=10}] (0,3) -- (0,-3);
\draw[decorate,decoration={coil,segment length=15}] (3,3) -- (3,-3);
\end{tikzpicture}
aspectの違い
\begin{tikzpicture}
\draw[decorate,decoration={coil,aspect=0.4}] (-3,3) -- (-3,-3);
\draw[decorate,decoration={coil,aspect=0.7}] (0,3) -- (0,-3);
\draw[decorate,decoration={coil,aspect=1}] (3,3) -- (3,-3);
\draw[decorate,decoration={coil,aspect=2}] (6,3) -- (6,-3);
\end{tikzpicture}
TeXclipソースコード