16

I want to decorate a path with little arrows (with definable length) parallel to it. I tried to modify an example from the manual, but I was only able to get arrowtips and not complete arrows where I can adjust the length. So is there a way to do this?

Here is what I tried:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}


\begin{document}

\begin{tikzpicture}[decoration={
markings,
mark=between positions 0 and 1 step 9.5mm with {\arrow{latex}},raise=0.1cm}
]
\draw [help lines] grid (3,2);
\draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);
\end{tikzpicture}


\end{document}

arrows

19

You can use any \draw command in the with options:

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{decorations.markings}


\begin{document}

\begin{tikzpicture}[decoration={
markings,
mark=between positions 0 and 1 step 9.5mm with {\draw [-latex] (-0.2,0) -- (0.2,0);},raise=0.1cm}
]
\draw [help lines] grid (3,2);
\draw [postaction={decorate}] (0,0) -- (3,1) arc (0:180:1.5 and 1);
\end{tikzpicture}


\end{document}

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.