[Tex/LaTex] How to center rotated text in table with figures

tablesvertical alignment

I'm trying to center the 2015 and 2016 labels in the left column of my table with figures:

\begin{figure}[htb]
\centering
\begin{tabular}{c c c}
& Juvenile salmon & High density \\
\multirow{2}{*}{\rotatebox[origin=c]{90}{2015}} & \includegraphics[width=0.4\textwidth]{figure1.pdf} &
\includegraphics[width=0.4\textwidth]{figure2.pdf} \\
\rotatebox[origin=c]{90}{2016} & \includegraphics[width=0.4\textwidth]{figure3.pdf} &
\includegraphics[width=0.4\textwidth]{figure4.pdf} 
\end{tabular}
\caption{This is all the schools characteristics plots.}
\end{figure}

I don't know why they show up at the bottom instead of being centered with the figures… Any help very much appreciated!

Example figure

Best Answer

Things (boxes) are lined up horizontally by their baselines. The rotated box has its baseline in the center, but the images have their baselines at the bottom.

I take it that the multirow was either an experiment or a mistake. Anyway, trying to use multirow with images is difficult at best (non-standard spacing).

\documentclass{standalone}
\usepackage{graphicx}
\usepackage{multirow}

\begin{document}

\begin{tabular}{c c c}
& Juvenile salmon & High density \\
\rotatebox[origin=c]{90}{2015} & \raisebox{-0.5\height}{\includegraphics[width=0.4\textwidth]{example-image-a}} &
\raisebox{-0.5\height}{\includegraphics[width=0.4\textwidth]{example-image-b}} \\
\rotatebox[origin=c]{90}{2016} & \raisebox{-0.5\height}{\includegraphics[width=0.4\textwidth]{example-image-c}} &
\raisebox{-0.5\height}{\includegraphics[width=0.4\textwidth]{example-image}}
\end{tabular}

\end{document}

enter image description here

Related Question