# Add details to TikZ picture

I have a tikZ picture. But couldn't understand how to ad some details.

\documentclass[tikz]{standalone}

\begin{document}
\begin{tikzpicture}[xscale=1,yscale=2]
\draw[domain=1.5:14.3,samples=300,blue, rotate=90, yshift=-128pt] plot(\x,{sin(\x r)});
\draw[domain=1.5:14.3,samples=300,blue, rotate=90, yshift=-64pt] plot(\x,{cos((\x+1.7) r)});
\draw[domain=1.5:14.3,samples=300,blue, rotate=90] plot(\x,{sin(\x r)});
\draw[domain=1.5:14.3,samples=300,blue, rotate=90, yshift=64pt] plot(\x,{cos((\x+1.7) r)});
\draw[domain=1.5:14.3,samples=300,blue, rotate=90, yshift=128pt] plot(\x,{sin(\x r)});
\draw[domain=1.5:14.3,samples=300,blue, rotate=90, yshift=192pt] plot(\x,{cos((\x+1.7) r)});

\end{tikzpicture}
\end{document}


I would like to add minimum and maximum distance between the two waves(somewhere around middle of the wave).
Ref: How to plot this diagram?

• What do you mean by that exactly? A double arrow between the waves? – Torbjørn T. Jun 10 '17 at 21:49
• @TorbjørnT. Somewhere like this, yes double arrow. – L.K. Jun 10 '17 at 21:52
• Is it intentional that you have +1.7 in the cosine functions, and not +1.57 (approximately pi/2)? – Torbjørn T. Jun 10 '17 at 21:54
• @TorbjørnT. Thanks for that input, my ignorance. – L.K. Jun 10 '17 at 21:56

Here's one suggestion, the code is simplified a bit. As you know the minima/maxima of sine/cosine functions, you can just draw two arrows where the y-coordinates are calculated with sin/cos.

\documentclass[tikz]{standalone}
\begin{document}
\begin{tikzpicture}[
xscale=1,yscale=2,
every plot/.append style={samples=50,domain=1.5:14.3},
rotate=90]

\begin{scope}[blue]
\draw plot(\x,{sin(\x r) - 5});
\draw plot(\x,{cos((\x+pi/2) r) - 2.5});
\draw plot(\x,{sin(\x r)});
\draw plot(\x,{cos((\x+pi/2) r) + 2.5});
\draw plot(\x,{sin(\x r) + 5});
\draw plot(\x,{cos((\x+pi/2) r) + 7.5});
\end{scope}

\draw [<->,>=stealth] (5*pi/2,{sin(5*pi/2 r)}) -- node[above] {$a$} (5*pi/2,{cos((5*pi/2+pi/2) r)+2.5});
\draw [<->,>=stealth] (5*pi/2,{sin(5*pi/2 r)}) -- node[above] {$b$} (5*pi/2,{cos((5*pi/2+pi/2) r)-2.5});
\end{tikzpicture}
\end{document}