\documentclass{article}

\usepackage{pgfplots}

\pgfplotsset{compat=1.12,lua debug}

\begin{document}

\begin{tikzpicture}
\begin{axis}[samples=2]

\addplot {x};
\addplot[red,update limits=false, domain=-10:10]
    {0};
\end{axis}
\end{tikzpicture}

\end{document}

