I have a problem on pgfplots with "fill between". In particular, the filled area covers the axes; see attached figure. What puzzles me is that I tested the same code on a different machine and everything looks good. Both are Macbook pro and with last version of GNUPLOT installed. Code is below. Thanks!
\documentclass{article}[![enter image description here][1]][1]
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.14}% current version is 1.15
\usepgfplotslibrary{fillbetween}
\usepackage{tikz}
\pagestyle{empty}
{\begin{tikzpicture}[scale=1]
\begin{axis}[
axis x line=center,
axis y line=center,
xlabel={$x_{p1}$},
ylabel={$x_{p2}$},
axis line style= ultra thick,
label style={font=\large},
title style={yshift=1ex},
xmin=-2,
xmax=2,
ymin=-2,
ymax=2,
title={$u=M$},
view={0}{90},
axis background/.style={fill=white},
]
\path[name path=axis] (axis cs:0,5) -- (axis cs:5,5);
\path[name path=axis2] (axis cs:-5,5) -- (axis cs:0,5);
\path[name path=axis3] (axis cs:-5,-5) -- (axis cs:0,-5);
\path[name path=axis4] (axis cs:-5,-5) -- (axis cs:0,-5);
\addplot[name path=A1, black,domain=-2:0,ultra thin]
(-1/2*abs(x)*x,x);
\addplot[name path=A2, black,domain=0:2,ultra thin]
(-1/2*abs(x)*x,x);
\addplot[name path=B1, black,domain=-1.8:0,ultra thin]
(-1/(2-0.5)*abs(x)*x,x);
\addplot[green!10] fill between[of=A1 and B1, on layer=axis foreground];
\addplot[black!30] fill between[of=B1 and axis];
\end{axis}
\end{tikzpicture}
\end{document}