1

I would like to create a curved wavy arrow with Tikz. Using the solution from here (How to get a wavy arrow for an edge?), I can create straight wavy arrows, but adapting to curves does not work and produces artifacts.

MWE:

    \documentclass[tikz, border=5]{standalone}
    \usetikzlibrary{shapes.arrows}
%%%
\usetikzlibrary{decorations.shapes}
\usetikzlibrary{shapes.geometric, arrows}
\usetikzlibrary{patterns}
\usepackage[compat=1.0.0]{tikz-feynman}
\usetikzlibrary{decorations.pathreplacing,angles,quotes,decorations.pathmorphing}
\usepackage{tkz-euclide}
\usepackage{pgfplots}
\pgfplotsset{compat=1.9}

\begin{document}
    \tikzset{decorate sep/.style 2 args=
        {decorate,decoration={shape backgrounds,shape=circle,shape size=#1,shape sep=#2}}}
    \begin{tikzpicture}[<->,    > = stealth',
        shorten > = 1pt,auto,
        node distance = 3cm,
        decoration = {snake,   % <-- added
            pre length=3pt,post length=1pt,% <-- for better looking of arrow,
        },
        ]

        %\path[draw=cyan,decorate] (5.0,0.2) edge [bend left=60] (2.2,0.2) node [above] {}; % curved line removes waves and has artifacts
        \path[draw=cyan, decorate] (5.0,0.2) -- (2.2,0.2) node [above] {}; % straight wavy line
    \end{tikzpicture}  
\end{document}

The MWE produces this:

enter image description here

The commented line produces this:

enter image description here

Any hints or alternative methods appreciated!

  • Just replace edge with to. – Sandy G Mar 06 '24 at 12:58
  • Either replace edge by to as suggested by Sandy or use a different more controllable curve like parabola : \path[draw=cyan,decorate] (5.0,0.2) to [bend left=60] (2.2,0.2); \draw[draw=cyan, decorate] (5.0,0.2) parabola[bend pos=0.5] bend +(0,0.2) (2.2,0.2); – Corentin Jacquet Mar 06 '24 at 14:11

0 Answers0