[Tex/LaTex] Page break between images of a figure

graphicssubfloats

I have several images in a figure which can not come on a single page. The images near the bottom are trying to insert inside the bottom instead of going to the new page. I am using a package \raggedbottom because earlier I was facing the problem of unusual space between equation.

Please suggest me, how can I move the images to the next page which are near the bottom.

image

The black line above is the bottom of first page.

\begin{figure}[!ht]
\subfloat[Original image]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/assignPixels/img1/image1}}\\%%Org 
\subfloat[Layer-1, Subgraph-1]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_SG1}} 
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L1_Sal}}\\       
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_SG1}}%%Layer-2
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_VI}}      
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L2_Sal}}\\           
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG1}}%%Layer-3
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG5}}     
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_SG6}}\\   
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L3_Sal}}\\       
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG1}}%%Layer-4
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG2}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG3}}     
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_SG8}} 
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_VI}}  
\subfloat[]{\includegraphics[width = 2in, height = 3cm, keepaspectratio]{bilder/concepts/GNGhierarchy/img1/L4_Sal}}
\caption{images}
\label{image}
\end{figure}

Best Answer

Your issue with placement here seem to resolve when using the following:

  1. Don't use a float. Instead, use the float package's [H] float specifier to set the float inside a minipage. This will give you preference over the (non-)float placement.

  2. Break the float manually at the desired location.

  3. Use \ContinuedFloat from the caption package to retain the existing \caption number.

enter image description here

\documentclass{article}

\usepackage{lipsum,graphicx,float}
\usepackage{subfig,caption}

\begin{document}

\lipsum[1-2]

\begin{figure}[H]
  \centering
  \setkeys{Gin}{width=2in,height=2cm,keepaspectratio}%
  \subfloat[Original image]{\includegraphics{example-image}} \\
  \subfloat[Layer-1]{\includegraphics{example-image-a}} 
  \subfloat[]{\includegraphics{example-image-b}}  
  \subfloat[]{\includegraphics{example-image-c}} \\
  \subfloat[]{\includegraphics{example-image-a}}%%Layer-2
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \caption{images}
\end{figure}

\begin{figure}[H]
  \ContinuedFloat\centering
  \setkeys{Gin}{width=2in,height=2cm,keepaspectratio}%
  \subfloat[]{\includegraphics{example-image-b}}%%Layer-3
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \subfloat[]{\includegraphics{example-image-b}}\\
  \subfloat[]{\includegraphics{example-image-c}}%%Layer-4
  \subfloat[]{\includegraphics{example-image-a}}
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}\\
  \subfloat[]{\includegraphics{example-image-a}}%%Layer-5
  \subfloat[]{\includegraphics{example-image-b}}
  \subfloat[]{\includegraphics{example-image-c}}
  \subfloat[]{\includegraphics{example-image-a}}
  \caption{images}
\end{figure}

\end{document}

Placing the images using [H] removes the issue of the last page float being set vertically centred, since the float is set like regular text, which will end up at the top of the page.