Hab eine Lösung gefunden:
<pre>\documentclass[11pt,a4paper]{article}
\documentclass[11pt,a4paper]{article}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
domain=-50:50,
xmin=-50, xmax=50,
ymin=0, ymax=1,
samples=100;
axis y line=center,
axis x line=middle,
xlabel={net},
ylabel={y},
]
\addplot+[mark=none, red, domain=-50:0] {0};
\addplot+[mark=none, red, domain= 0:50] {1};
\end{axis}
\end{tikzpicture}
\end{document}</pre>
\end{document}