I find:
\begin{tikzpicture}
\draw [->,decorate,decoration=snake] (0,0) -- (2,0);
\end{tikzpicture}
in TikZ manual, but dose not work! How can i draw snake edges in automata using tikz?
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It only takes a minute to sign up.
Sign up to join this communityThe following code compiles:
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.pathmorphing}
%\usepackage{pgfplots} %% Using pgfplots package alone works as well.
\begin{document}
\begin{tikzpicture}
\draw [->,decorate,decoration=snake] (0,0) -- (2,0);
\end{tikzpicture}
\end{document}
This yields the output in the manual.
But as the manual suggests,
\begin{tikzpicture}
\draw [->,decorate,decoration={snake,amplitude=.4mm,segment length=2mm,post length=1mm}]
(0,0) -- (3,0);
\end{tikzpicture}
yields a better output as follows:
\tikzlibrary
?\documentclass{..... \emd{document}
into your question?\usetikzlibrary{decorations.pathmorphing}
.pgfplots
and somehow it goes through.