Inspiration video, for Linsys lab dag 2, use 15:40.
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
colormap/viridis,
title = {THIS IS A TITLE},
xlabel = $x$,
ylabel = $y$,
zlabel = $z$
]
\addplot3[
surf,
samples=18,
domain=-3:3
]
{exp(-x^2-y^2)*x};
\end{axis}
\end{tikzpicture}
\end{document}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
clip = false,
axis lines = middle,
xlabel = $x$,
ylabel = $y$,
title = {THIS IS A TITLE}
]
\addplot
[
color = red,
samples=50,
domain=-2:2,
]{sin(deg(x))}
node[right, pos=1]{$f(x)=sin(x)$};
\end{axis}
\end{tikzpicture}
\end{document}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
clip = false,
axis lines = middle,
xlabel = $x$,
ylabel = $y$,
title = {}
]
\addplot
[
color = blue,
samples=50,
domain=,
]{}
node[right, pos=1]{$f(x)=$};
\end{axis}
\end{tikzpicture}
\end{document}