\documentclass[border=1pt]{standalone}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fourier}
\usepackage{pgfplots}
\pgfplotsset{compat=1.18}
\usepackage{amsmath} % dla pi

\begin{document}

\begin{tikzpicture}
\begin{axis}[
  axis lines=middle,
  xmin=-2*pi, xmax=2*pi,
  ymin=-1.2, ymax=1.2,
  xtick={-2*pi, -3*pi/2, -pi, -pi/2, 0, pi/2, pi, 3*pi/2, 2*pi},
  xticklabels={$-2\pi$, $-\frac{3\pi}{2}$, $-\pi$, $-\frac{\pi}{2}$, 
    $0$, $\frac{\pi}{2}$, $\pi$, $\frac{3\pi}{2}$, $2\pi$},
  ytick={-1, -0.5, 0, 0.5, 1},
  yticklabels={$-1$, $-0.5$, $0$, $0.5$, $1$},
  tick label style={font=\scriptsize},
  axis equal image,
  enlargelimits=false,
  legend style={at={(0.5,-0.15)}, anchor=north, legend columns=-1, 
    font=\scriptsize},
  xlabel={$x$},
  ylabel={$y$},
  grid=none
]
\addplot[black, thick, domain=-2*pi:2*pi, samples=200]{sin(deg(x))};
\addlegendentry{$\sin x$}

\addplot[black, thick, dashed, domain=-2*pi:2*pi, samples=200]
  {cos(deg(x))};
\addlegendentry{$\cos x$}
\end{axis}
\end{tikzpicture}

\end{document}
