\documentclass[a4paper]{article}
\usepackage{german}
\usepackage[utf8]{inputenc}

\usepackage{pgfplots}
\usepackage{pgfplots.assert}

\usepgfplotslibrary{fillbetween}

\begin{document}
\thispagestyle{empty}
\parindent=0pt
\parskip10pt

\begin{tikzpicture}
	\begin{axis}[samples=2]
	\addplot+[name path=A] {x};

	\addplot+[name path=B] {1};

	%\tracingmacros=2
	\addplot[fill=yellow] 
		fill between[of=A and B];
	\end{axis}
\end{tikzpicture}



\end{document}

