Like this?

\documentclass[tikz, margin=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ width=7cm, height=5cm, %aspect ratio
xmin=-1, xmax=1, ymin=0, ymax=3.1, %axis dimension
samples=200, %resolution
axis line style={-},
axis x line=bottom, x axis line style={-|},
xtick={-1,0,1},ymajorticks=false , %ticks
xlabel=$x$,ylabel=$y$, every axis x label/.style={at={(ticklabel* cs:1.05)},anchor=west},every axis y label/.style={at={(ticklabel* cs:1.05)},anchor=south}, %axis labels
]
\addplot[color=black]{sin(deg(x)*3)+2};
\addplot[color=black]{sin(deg(x)*3)+1};
\draw[black!60, densely dashed,thick] (-.4, 1.06796091403) -- (.4, 1.93203908597);
\draw[black!60!red, densely dashed,thick] (-.4, 0.06796091403) -- (.4, 2.93203908597);
\end{axis}
\end{tikzpicture}
\end{document}
EDIT:
To get something that resembles the picture you linked, you can do this:

\documentclass[tikz, margin=3mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.14}
\begin{document}
\begin{tikzpicture}
\begin{axis}[ width=7cm, height=5cm, %aspect ratio
xmin=-1, xmax=1, ymin=0, ymax=3.1, %axis dimension
samples=200, %resolution
axis line style={-},
axis x line=bottom, x axis line style={-|},
xtick={-1,0,1},ymajorticks=false , %ticks
xlabel=$x$,ylabel=$y$ ]
\foreach \n in {1, ..., 35}
{
\addplot[color=blue,thick]{sin(deg(x)*3.14159)+2.5+\n/20};
\addplot[color=blue,thick]{sin(deg(x)*3.14159)+1.5-\n/20};
}
\addplot[color=blue,thick,domain=-.5:.5]{(sin(deg(x)*3.14159))*31/20+2};
\addplot[color=blue,thick,domain=-.5:.5]{(sin(deg(x)*3.14159))*9/20+2};
\end{axis}
\end{tikzpicture}
\end{document}