0

I am trying to put 10 figures using subfigure environment. I use 4x3 matricx to do that...but the last figure comes at the bottom of the page instead of going to the new page.

What can be done?

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_1}
    \caption{Mode-1}
    \label{fig:m1}
\end{subfigure}
    \hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_2}
    \caption{Mode-2}
    \label{fig:m2}
\end{subfigure}
        \hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_3}
    \caption{Mode-3}
    \label{fig:m3}
\end{subfigure}\\
 \vspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_4}
    \caption{Mode-4}
    \label{fig:m4}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_5}
    \caption{Mode-5}
    \label{fig:m5}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_6}
    \caption{Mode-6}
    \label{fig:m6}
\end{subfigure}\\
\vspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_7}
    \caption{Mode-7}
    \label{fig:m7}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_8}
    \caption{Mode-8}
    \label{fig:m8}
\end{subfigure}
\hspace{1cm}
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_9}
    \caption{Mode-9}
    \label{fig:m9}
\end{subfigure}
  \newpage
\begin{subfigure}[b]{0.25\textwidth}
    \centering
    \input{Figures_matlab/md_10}
    \caption{Mode-10}
    \label{fig:m10}
\end{subfigure}
  \caption{Mode shapes 1-10}
\label{md_shps}
\end{figure}[enter image description here][1]
  • 1
    A figure environment cannot split. You would need something like \ContinuedFloat from the caption package. – Johannes_B Jul 4 '16 at 7:21
3

Similar question are quite often here (TeX.Se site), so it will be probably designate as duplicate ...

Your last figure had to be at bottom of other sub figures, since all are in the same float. Float can not span two pages! If you like to have last image on the next page, than you had to make two figures: in the first 3 x 3 images and last on the second. But why you should do this? It is enough place to have all images on the same page even if you enlarge them as I do:

enter image description here

You also can slightly reduce space between rows with images (now is to my taste to large). Since I haven't your images, I use example-image from package mwe to simulate them.

Code is slightly modified your code. Main difference is that I eliminate (worthless in your case) \newpage command in it:

\documentclass{article}
\usepackage{graphicx,subcaption}
\usepackage[showframe]{geometry}

\begin{document}
\begin{figure}[htbp]
\centering
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-1}
    \label{fig:m1}
\end{subfigure}
    \hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-2}
    \label{fig:m2}
\end{subfigure}
        \hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-3}
    \label{fig:m3}
\end{subfigure}

    \vspace{1cm}
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-4}
    \label{fig:m4}
\end{subfigure}
\hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-5}
    \label{fig:m5}
\end{subfigure}
\hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-6}
    \label{fig:m6}
\end{subfigure}

\vspace{1cm}
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-7}
    \label{fig:m7}
\end{subfigure}
\hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-8}
    \label{fig:m8}
\end{subfigure}
\hfil
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-9}
    \label{fig:m9}
\end{subfigure}

\vspace{1cm}
\begin{subfigure}[b]{0.3\textwidth}
    \centering
    \includegraphics[width=0.95\hsize]{example-image}
    \caption{Mode-10}
    \label{fig:m10}
\end{subfigure}
  \caption{Mode shapes 1-10}
\label{md_shps}
\end{figure}
\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.