Alinear correctamente los encabezados de los subflotadores

Alinear correctamente los encabezados de los subflotadores

Estoy usando el siguiente código, pero los encabezados de las columnas no están alineados en el centro de las columnas, por lo que si alguien pudiera aconsejarme:

\documentclass{report}
\usepackage{mwe}

\newlength{\tempheight}
\newlength{\tempwidth}

\newcommand{\rowname}[1]% #1 = text
{\rotatebox{90}{\makebox[\tempheight][c]{#1}}}

\newcommand{\columnname}[1]% #1 = text
{\makebox[\tempwidth][c]{#1}}

\begin{document}
\centering%

\begin{figure}
\setlength{\tempheight}{0.15\textheight}
\settowidth{\tempwidth}{\includegraphics[height=\tempheight]{example-image-a}}%
\centering
\hspace{\baselineskip}
\columnname{Without Results}
\columnname{With Results}\\
\rowname{Row 1}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-a}}\label{1}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-b}}\label{11}\\
\rowname{Row 2}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-c}}\label{2}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-d}}\label{22}\\
\rowname{Row 3}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-e}}\label{3}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-f}}\label{33}\\
\rowname{Row 4}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-g}}\label{4}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-h}}\label{44}
\caption{capt1}
\label{fig1}
\end{figure}
\end{document}

Respuesta1

El \tempheighty \tempwidthsalió todo mal. Con algunos ajustes, obtenemos esto:

\documentclass{report}
\usepackage{mwe,subfig,calc}

\newlength{\tempheight}
\newlength{\tempwidth}

\newcommand{\rowname}[1]% #1 = text
{\rotatebox{90}{\makebox[\tempheight][c]{#1}}}

\newcommand{\columnname}[1]% #1 = text
{\makebox[\tempwidth][c]{#1}}%

\begin{document}
\centering%

\begin{figure}
\setlength{\tempheight}{\heightof{\includegraphics[width=0.48\linewidth]{example-image-a}}}
\setlength{\tempwidth}{0.48\linewidth}%
\centering
\hspace{0.52\baselineskip}
\columnname{Without Results}
\columnname{With Results}\\
\rowname{Row 1}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-a}}\label{1}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-b}}\label{11}\\
\rowname{Row 2}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-c}}\label{2}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-a}}\label{22}\\
\rowname{Row 3}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-b}}\label{3}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-c}}\label{33}\\
\rowname{Row 4}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image}}\label{4}
\subfloat{\includegraphics[width=0.48\linewidth]{example-image-a}}\label{44}
\caption{capt1}
\label{fig1}
\end{figure}
\end{document}

ingrese la descripción de la imagen aquí

Por otro lado, como no estás usando s, también subcaptionpuedes usarlo .tabular

\documentclass{report}
\usepackage{graphicx,calc}

\newlength{\tempheight}

\setlength{\tempheight}{\heightof{\includegraphics[width=0.48\linewidth]{example-image-a}}}

\newcommand{\rowname}[1]% #1 = text
{\rotatebox{90}{\parbox{\tempheight}{\centering #1}}}


\begin{document}
\centering%

\begin{figure}
\begin{tabular}{ccc}
& Without Results & With Results\\
\rowname{Row 1} &\includegraphics[width=0.48\linewidth]{example-image-a}
& \includegraphics[width=0.48\linewidth]{example-image-b}\\
\rowname{Row 2} &
\includegraphics[width=0.48\linewidth]{example-image-c} &
\includegraphics[width=0.48\linewidth]{example-image-a}\\
\rowname{Row 3} &
\includegraphics[width=0.48\linewidth]{example-image-b}&
\includegraphics[width=0.48\linewidth]{example-image-c}\\
\rowname{Row 4}&
\includegraphics[width=0.48\linewidth]{example-image}&
\includegraphics[width=0.48\linewidth]{example-image-a}
\end{tabular}
\caption{capt1}
\label{fig1}
\end{figure}
\end{document}

ingrese la descripción de la imagen aquí

información relacionada