With respect to this link: confusion matrix using only LaTeX code, which was very helpful, I was able to reduce the example to a 2x2 matrix, however when trying to center the whole structure, the y-axis label is centered independent from the rest of the table structure.
This was done by encapsulating the table in a figure, and subsequently centering environment. My question is now, how can I center the table as whole?
I wish to be able to place the table in its entirety where I want and add both labels and captions as well if possible.
Edit: Added example code. Also included all packages used since I'm not sure whether these wel affect possible solutions.
%%%% Add Packages %%%%
\documentclass[11pt]{report}
\usepackage{graphicx}
%%%% Confusion Matrix Body %%%%
\newcommand\MyBox[1]{%
\fbox{\parbox[c][1.7cm][c]{1.7cm}{\centering #1}}%
% Size of boxes
}
\newcommand\MyVBox[1]{%
\parbox[c][1cm][c]{1cm}{\centering\bfseries #1}%
}
\newcommand\MyHBox[2][\dimexpr1.7cm+2\fboxsep\relax]{%
\parbox[c][1cm][c]{#1}{\centering\bfseries #2}%
}
\newcommand\MyTBox[4]{%
\MyVBox{#1}
\MyBox{#2}\hspace*{-\fboxrule}%
\MyBox{#3}\par\vspace{-\fboxrule}%
}
%%%%
\begin{document}
\begin{figure}
\begin{center}
{
\offinterlineskip
\raisebox{-5cm}[0pt][0pt]{\rotatebox[origin=c]{90}{\parbox[c][0pt][c]{0cm}{\textbf{Actual}\\[20pt]}}}\par
\hspace*{1cm}\MyHBox[\dimexpr3.4cm+6\fboxsep\relax]{Predicted}\par
\hspace*{1cm}\MyHBox{30}\MyHBox{90}\par
\MyTBox{30}{9418}{1471}
\MyTBox{90}{144}{317}
}
\end{center}
\end{figure}
\end{document}


\documentclass{...}and ending with\end{document}. The cause of your problem will likely be explained by the code which generates the problem, please provide an MWE so we can see how you reach the faulty output. – Dai Bowen Jan 23 '17 at 13:46\begin{center}...\end{center}insidefigureor another floating environment. – Jan 23 '17 at 16:51