%\documentclass[]{article}
\documentclass[border=3pt, varwidth]{standalone}
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.13}
\begin{document}
\begin{tikzpicture}
\begin{axis}[enlargelimits=false,
ticklabel style={font=\ttfamily}, % Schriftart wird nicht angenommen?
]
\addplot[
matrix plot,
mark=*,%nodes near coords=\coordindex,
mesh/color input=explicit,
]
coordinates {
(1,1) [color=red] (2,1) [color=blue] (3,1) [color=yellow]
(1,2) [color=black] (2,2) [color=brown] (3,2) [color=magenta]
(1,3) [color=green] (2,3) [color=red] (3,3) [color=white]
};
\end{axis}
\end{tikzpicture}
\noindent Ist: 1 2 3 \\
Soll: \texttt{1 2 3 }
\end{document}