1

Does anybody know the easiest way to prevent a subfigure from going to the next page? I have 3 subfigures, 1 or 2 of which would easily fit on the previous page, but because it is in one figure, it puts all three figures on the next page.

My code is:

\begin{figure}[H]
\begin{center}
\subfigure[Results on MNIST fully connected]{
\includegraphics[scale=0.48]{result4_mnist_fc_s2gd.png}
}
\subfigure[Results on MNIST ConvNet]{
\includegraphics[scale=0.48]{result5_mnist_conv_s2gd.png}
}
\subfigure[Results on CIFAR-10 ConvNet]{
\includegraphics[scale=0.48]{result6_cifar10_s2gd.png}
}
\end{center}
\caption{Results for S2GD methods}
\label{fig:NN_example}
\end{figure}

Thanks!

6
  • 1
    Float environments are unbreakable. You have to split up the figure into two or three. Aug 20 '15 at 14:04
  • Could we have a minimal fully compilable example that demonstrates the problem, so we can test possible solutions? By the way, use \centering instead of the center environment: the latter adds spurious vertical spacing.
    – Bernard
    Aug 20 '15 at 14:05
  • Instead scale try to use width. If width=0.32\textwidth gives satisfactory big pictures, than you can put all three figures in one line. Otherwise you need to split them into two figures (as stated @HeikoOberdiek.
    – Zarko
    Aug 20 '15 at 14:24
  • @Zarko Scaling makes sense, if the images have different widths. This ensures, that the image elements (text, line thickness, ...) are scaled with the same scaling factor. Aug 20 '15 at 14:39
  • @HeikoOberdiek, actually I /we don't know anything about image's size.If they are different width, than the scaling is right choice, however, I will check if is possible shrink images to size, which allow to put them in one line. If this is not acceptable, then I see only to possibilities: (i) make figure wider than text (for example with help of changepage package or (ii) split figure as you suggested.
    – Zarko
    Aug 20 '15 at 14:52

Browse other questions tagged or ask your own question.