But I've come up with this one:
I've searched the internet first but the histograms they were plotting were so much complicated.
\begin{tikzpicture}
\begin{axis}[
symbolic x coords={$0$, $1$, $2$},
xtick=data]
\addplot[ybar,fill=blue] coordinates {
($0$, 0.25
($1$, 0.50)
($2$, 0.25)
};
\end{axis}
\end{tikzpicture}


