# two rows of figures within sidewaysfigure not properly aligned vertically

I'm trying to create two panels of figures, with a title for each one. However, I just cannot simultaneously center the title of the bottom panel and align the bottom figures with the top figures. In this example, the figured are not aligned, but the text (b) is:

\begin{sidewaysfigure}
\centering
\caption{\large Distribution of the W statistic}\par\medskip
\label{w_c}
\begin{center}{(a) Singh-Madalla with c=1.7 }\end{center}
\begin{center}{(b) Singh-Madalla with c=1.2 }\end{center}%\newline
\includegraphics[width=0.23\textheight]{ge_2_fim2.pdf}
\end{sidewaysfigure}


In this example, the 4 bottom figures allign with the 4 top ones, but the text is one centered:

\begin{sidewaysfigure}
\centering
\caption{\large Distribution of the W statistic}\par\medskip
\label{w_c}
\begin{center}{(a) Singh-Madalla with c=1.7 }\end{center}
{(b) Singh-Madalla with c=1.2 }\newline
\includegraphics[width=0.23\textheight]{ge_2_fim2.pdf}
\end{sidewaysfigure}


How to get both parts?

Thanks!

• Welcome to TeX.SE. You don't have a \begin{center} ... \end{center} "wrapper" for the final subcaption. Is this deliberate? – Mico Oct 26 '16 at 19:35
• @Mico in the top code, I do. but when I put it, the 4 bottom figures are no longer aligned with the 4 top figures – user3624322 Oct 26 '16 at 19:37

• Don't use \quad to separate the graphs; use \hfill instead. And, use only three \hfill instructions, not four.

• Don't engage in excessive amounts of visual formatting, e.g., when setting up the captions of the subfigures. Instead, use the subcaption package and its subfigure environment; it provides its own \caption statement, which will automatically be centered and be numbered (a), (b), etc.

\documentclass[demo]{article} % omit 'demo' option in real doc.
\usepackage{graphicx,rotating,subcaption}
\begin{document}
\begin{sidewaysfigure}
\caption{Distribution of the $W$ statistic} \label{w_c}
\begin{subfigure}{\textwidth}
\caption{Singh-Madalla with $c=1.7$} \label{w_c_1.7}
\includegraphics[width=0.23\textwidth]{ge_0_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_0_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_1_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_2_fim2.pdf}
\end{subfigure}

\bigskip
\begin{subfigure}{\textwidth}
\caption{Singh-Madalla with $c=1.2$} \label{w_c_1.2}
\includegraphics[width=0.23\textwidth]{ge_0_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_0_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_1_fim2.pdf}\hfill
\includegraphics[width=0.23\textwidth]{ge_2_fim2.pdf}
\end{subfigure}
\end{sidewaysfigure}
\end{document}