I'd like to argue that it is much more fun to just draw these with elementary TikZ commands. My previous answers were unnecessarily complicated.
\documentclass{article}
\usepackage{amsmath}
\usepackage{pgfplots}
\tikzset{declare function={unitstep(\x)=notless(\x,0);}}
\tikzset{declare function={delta(\x)=equal(\x,0);}}
\begin{document}
\[ u[n]=\begin{cases} 1 & n\ge0 \\
0 & n<0 \end{cases}\]
\begin{tikzpicture}[thick,scale=0.5]
\draw[-] (-10,0) -- (10,0) node [below] {$n$};
\node[below](0,0){0};
\foreach \x in {-9,...,9}
{\draw[fill=black] (\x,0) -- (\x,{unitstep(\x)}) circle (0.2cm);
}
\end{tikzpicture}
\[ \delta[n]=\begin{cases} 1 & n=0 \\
0 & n\ne0 \end{cases}\]
\begin{tikzpicture}[thick,scale=0.5]
\draw[-] (-10,0) -- (10,0) node [below] {$n$};
\node[below](0,0){0};
\foreach \x in {-9,...,9}
{\draw[fill=black] (\x,0) -- (\x,{delta(\x)}) circle (0.2cm);
}
\end{tikzpicture}
Let's now plot $u[x]+u[x-2]$.\\
\begin{tikzpicture}[thick,scale=0.5]
\draw[-] (-10,0) -- (10,0) node [below] {$n$};
\node[below](0,0){0};
\foreach \x in {-9,...,9}
{\draw[fill=black] (\x,0) -- (\x,{unitstep(\x)+unitstep(\x-2)}) circle (0.2cm);
}
\end{tikzpicture}
\end{document}
