# Recreate EEG waves in pgfplots

I would like to recreate this image: I would like to use pgfplots with math functions so that the waves are mathematically generated. Here is what I got so far:

\documentclass{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[domain=-5:5, samples=250,no markers, hide axis,y=1cm,thick]
\addplot {0.3*cos(2*deg(x))}node[right]{$\lambda=1Hz$};
\addplot {0.3*cos(4*deg(x))+1}node[right]{$\lambda=2Hz$};
\addplot {0.3*cos(8*deg(x))+2}node[right]{$\lambda=4Hz$};
\end{axis}
\end{tikzpicture}
\end{document} Ideas are welcome.

You could just add some random noise.

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{compat=1.17}
\begin{document}
\begin{tikzpicture}[declare function={a1=0.6;a2=0.3;a3=0.4;}]
\begin{axis}[domain=-5:5, samples=75,no markers, hide axis,y=1cm,thick,
\addplot[samples=51] {0.3*cos(2*x)*(1+a1*rand)}node[right]{$\lambda=1\,$Hz};
\addplot {0.3*cos(4*x)*(1+a2*rand)+1}node[right]{$\lambda=2\,$Hz};
\addplot {0.3*cos(8*x)*(1+a3*rand)+2}node[right]{$\lambda=4\,$Hz}; • @Pedro Sure, you could add a Fourier sum. But I would not think that this will be a truly accurate modeling of an EEG. (It would be shocking if our brain could get modeled but just a few Fourier terms. ;-) So maybe random isn't too bad. I agree on the the \pgfmathsetseed part, though. Maybe one can make the Fourier coefficients random. – user194703 Jun 4 at 19:12