I want to fill the area between two curves and have the grid lines below the filling. Is this possible?
(From Showing grid on top of plot fill with PGFplots? I thought axis on bottom might work, but this seems not to be a command.)
Edit: The filling method is the one suggested in Fill the area between two curves calculated by pgfplots by Christian Feuersanger, and requires a recent version of pgfplots.
\documentclass{standalone}
\usepackage{tikz,pgfplots}
\pgfplotsset{compat=1.10}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis lines = middle,
smooth,
no markers,
xlabel = {$x$},
ylabel = {$y$},
minor tick num =1,
grid=both,
domain=0:2,]
\addplot+[domain=0:1,samples=200,name path=A,black] {sqrt(x)};
\addplot+[domain=0:1,name path=B,black] {x};
\addplot[blue!50] fill between[of=A and B];
\end{axis}
\end{tikzpicture}
\end{document}


pgfplots? I had to update it to use the filling method Christian Feuersanger recommended in http://tex.stackexchange.com/questions/17517/fill-the-area-between-two-curves-calculated-by-pgfplots. – Chris Chudzicki Apr 11 '14 at 15:44pgf. – A.Ellett Apr 11 '14 at 17:03