# Reduce space between subfigure and the subfigure captions

How can I reduce the space between subfigure and the sufigure captions ?

Preamble

\usepackage{float}%exact location
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption} % for subfigures


Example.

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.4textwidth}
\includegraphics[width=\textwidth]{Pictures/pic0.pdf}
\caption{}
\label{fig:lab0}
\end{subfigure}
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{Pictures/pic1.pdf}
\caption{}
\label{fig:lab1}
\end{subfigure}

\caption{A long caption}\label{fig:lab}
\end{figure}

• It is not clear from the context which space between figure and captions you are trying to reduce. Do you mean those created by the \caption{} commands in subfigure? But you have kept them empty, leaving one to misunderstand. – Masroor Sep 12 '13 at 12:53
• Leaving empty allows one to number the subfigure with (a), (b) and so on. if I remove those, then the subfigures are not numbered. – cosmicraga Sep 12 '13 at 13:06
• That was not my point. It is obvious that if you leave them blank, only the subfigure numbers will be generated. But when you say "reduce the space between subfigure and the sufigure captions", that makes one wonder, whether this is the vertical space between individual figures and subfigure captions, or whether this is the vertical space before the main caption. Anyway, looks like you have received some excellent answers and comments. These should be useful to all of us. – Masroor Sep 12 '13 at 14:54
• My understanding is, the individual subfigures make the overall 'figure'. So, there are two types of captions, 1) Subfigure caption 2) Figure caption. My problem was with the subfigure caption. I could have added the word 'individual' may be to make it more clear. – cosmicraga Sep 12 '13 at 17:40

You could just place a \vspace command after the last figure and before the caption:

\documentclass{article}
\usepackage{float}%exact location
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption} % for subfigures

\begin{document}

\begin{figure}[H]
\centering
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{}
\label{fig:lab0}
\end{subfigure}
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-b}
\caption{}
\label{fig:lab1}
\end{subfigure}
\vspace{-2\baselineskip}
\caption{A long caption}\label{fig:lab}
\end{figure}

\end{document}


You probably don't want to use the value -2\baselineskip as I have done. I've only done that so you can readily see the effect below:

UPDATE

Per the comments to this post, there is an aboveskip and belowskip option available via the caption package, which is loaded when loading subcaption. This allows you to more conveniently make a change to how the captions are placed.

\documentclass{article}
\usepackage{float}%exact location
\usepackage{graphicx}
\usepackage{caption}
\usepackage{subcaption} % for subfigures

\begin{document}

\begin{figure}[H]
\captionsetup[subfigure]{aboveskip=-1pt,belowskip=-1pt}
\centering
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-a}
\caption{}
\label{fig:lab0}
\end{subfigure}
\begin{subfigure}[b]{0.4\textwidth}
\includegraphics[width=\textwidth]{example-image-b}
\caption{}
\label{fig:lab1}
\end{subfigure}
\caption{A long caption}\label{fig:lab}
\end{figure}

\end{document}

• The better way is to use the aboveskip option for the »subcaption« package. By the way it was asked for the reduction of space between sub-figures and sub-captions, not between the sub-figures and the main caption. – Thorsten Donig Sep 12 '13 at 12:56
• This reduces the space between the main CAPTION and the last subfigure. I want to reduce the space between all the 'subcaptions' to the corresponding subfigures. – cosmicraga Sep 12 '13 at 12:58
• @cosmicraga You can do the same thing within each subfigure. – A.Ellett Sep 12 '13 at 13:02
• @A.Ellett \captionsetup[subfigure]{aboveskip=1pt} which can be global (in the preamble) or local (in the figure environment, before any subfigure). – egreg Sep 12 '13 at 13:04
• @cosmicraga: Just use \usepackage[aboveskip=2pt]{subcaption}. – Thorsten Donig Sep 12 '13 at 13:06