如何使 rotatetext parbox 居中?

如何使 rotatetext parbox 居中?

下面的代码将文本 MNIST 置于中心之外。我想将其与文本 SSIM 对齐。我将 parbox 更改为不同的 cm 值,但没有任何变化。如何?

\begin{figure}[t]
    \scriptsize
    \begin{center}
        \begin{tabular}{ccc}
            \rotatebox{90}{\parbox{1cm}{\Large{MNIST}}} & \includegraphics[width=0.38\textwidth]{ablation/mnistssim_final.png}& \includegraphics[width=0.35\textwidth]{ablation/mnistmse.png}\\
            %\multicolumn{2}{c}{MNIST}\\
%       \end{tabular}
%       \caption{MSE and SSIM on the moving MNIST action dataset with various \textbf{M} window size and $\mathcla{H}$ output horizon configurations. Timestep is the prediction extent $\mathbf{T}$.}
        %\label{fig:ablationmnist-inputoutput}
%   \end{center}
%\end{figure}

%\begin{figure}[t]
%   \begin{center}
%       \begin{tabular}{cc}
            KTH & \includegraphics[width=0.38\textwidth]{ablation/kthssim.png}& \includegraphics[width=0.35\textwidth]{ablation/kthpsnr.png}\\
            \multicolumn{2}{c}{KTH}\\
        \end{tabular}
        \caption{The effect of \textbf{M} window size and the output horizon $\mathcal{H}$ on the performance. First row shows SSIM and MSE on the moving MNIST action dataset, and the second row shows SSIM and PSNR on the KTH action dataset.}
        \label{fig:ablationkth-inputoutput}
    \end{center}
\end{figure}

在此处输入图片描述

答案1

使用adjustboxorigin=的键\rotatebox

\documentclass{article}

\usepackage{amssymb}
\usepackage[export, demo]{adjustbox}
\usepackage{booktabs}

\begin{document}

\begin{figure}[t]
    \scriptsize
    \centering
        \begin{tabular}{ccc}
            \rotatebox[origin =c]{90}{\Large MNIST\enspace} & \includegraphics[width=0.38\textwidth, valign=c]{ablation/mnistssim_final.png}& \includegraphics[width=0.35\textwidth, valign=c]{ablation/mnistmse.png}\\\\
\addlinespace
            KTH & \includegraphics[width=0.38\textwidth, valign=c]{ablation/kthssim.png}& \includegraphics[width=0.35\textwidth, valign=c]{ablation/kthpsnr.png}\\
\addlinespace
            \multicolumn{2}{c}{KTH}\\
        \end{tabular}
        \caption{The effect of \textbf{M} window size and the output horizon $\mathcal{H}$ on the performance. First row shows SSIM and MSE on the moving MNIST action dataset, and the second row shows SSIM and PSNR on the KTH action dataset.}
        \label{fig:ablationkth-inputoutput}
\end{figure}

\end{document} 

在此处输入图片描述

相关内容