19

I am using subfig package. Is it possible to reduce the spacing between two sufloats one below the other? I couldn't find anything in the documentation.

2
  • 2
    Just use \\[<negativespace>] after the \subfloat line. By <negativespace> I mean some thing like [-0.5cm]
    – user11232
    Feb 27, 2014 at 23:42
  • 1
    Just to help us help you, could you provide a minimal working example (MWE) that uses example-image for the subfloats? It would really speed up getting solutions your way... in general.
    – Werner
    Feb 28, 2014 at 0:19

2 Answers 2

18

You can use \\[<negativespace>] like \\[-2ex] after the last sub float in the current line.

Some example:

\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}
\begin{figure}[htb]
 \subfloat[Some figure]{\includegraphics[width=0.48\textwidth]{example-image-a}}\hfill
 \subfloat[Some other figure]{\includegraphics[width=0.48\textwidth]{example-image-b}}\\[-2ex]  %%<-- in this line
 \subfloat[Some more]{\includegraphics[width=0.48\textwidth]{example-image-c}}\hfill
 \subfloat[Some less]{\includegraphics[width=0.48\textwidth]{example-image}}
 \caption{There are example figures}
\end{figure}
\end{document}

enter image description here

2
  • \[negative space] works perfectly
    – Kabira K
    Feb 28, 2014 at 19:21
  • Is this allowed in submissions to ACM conference?
    – wolfram77
    Nov 18, 2022 at 14:22
13

Here's a way:

\documentclass{article}
\usepackage{subfig}
\usepackage{graphicx}
\begin{document}

\begin{figure}[htb]
\captionsetup[subfloat]{farskip=2pt,captionskip=1pt}
\centering
\subfloat[Some figure]{\includegraphics[width=0.48\textwidth]{example-image-a}}\hfill
\subfloat[Some other figure]{\includegraphics[width=0.48\textwidth]{example-image-b}}

\subfloat[Some more]{\includegraphics[width=0.48\textwidth]{example-image-c}}\hfill
\subfloat[Some less]{\includegraphics[width=0.48\textwidth]{example-image}}

\caption{There are example figures}
\end{figure}
\end{document}

The parameter farskip governs the spacing above and between rows of subfloats; with captionskip we set the distance from the subfigure and the caption. Play with the values; the \captionsetup[subfloat]{...} command can also be given in the preamble and so it will have effect on all subfloats. So, you can have both global and local setting, if necessity arises.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .