If you compile this MWE you will find that the frame for the 2d plot is closed, but for the contour plot, which is a 3d plot, not. Both figures are taken from the examples from the pgfplots manual. How can I fix this?
\documentclass[
10pt
]{scrreprt}
\usepackage{pgfplots}
\usepgfplotslibrary{patchplots}
\pgfplotsset{compat=newest}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel=Cost,
ylabel=Error
]
\addplot[
color=red,mark=x
] coordinates {
(2,-2.8559703)
(3,-3.5301677)
(4,-4.3050655)
(5,-5.1413136)
(6,-6.0322865)
(7,-6.9675052)
(8,-7.9377747)
};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[
title={$x \exp(-x^2-y^2)$},
xlabel=$x$,
ylabel=$y$,
small,
view={0}{90},
width=10cm,
height=5cm
]
\addplot3[
surf,
% shader=interp,
domain=-2:2,
domain y=-1.3:1.3,
]{exp(-x^2-y^2)*x};
\end{axis}
\end{tikzpicture}
\end{document}