# Reduce space between figures in tabular

I have arranged 4 plots using tabular. Now I try to decrease the space between the rows to move the plots and the labels closer together.

In another post (Column and row padding in tables) I read I should use

 {\renewcommand{\arraystretch}{1}%


However this is only working to a fixed lower bound (0.5 or something). I would like to decrease the space even more.

Here is a simplified example:

\documentclass[]{article}
\usepackage{graphicx}
\usepackage{tikz}

\begin{document}

\begin{figure}
\small
\begin{tabular}{cc}
\input{top_left_figure.tex} & \input{top_right_figure.tex} \\
(a) Sub figure 1 & (b)  Sub figure 2 \\
\input{bottom_left_figure.tex} & \input{bottom_right_figure.tex} \\
(c)  Sub figure 3 & (d)  Sub figure 4
\end{tabular}
\caption{My title}
\end{figure}

\end{document}

• for a MWE, it is better to use actual graphics and use the demo version of graphics, so one can just compile the file as is. One can't compile your MWE as is, since it wants actual latex external files. – Nasser Jun 28 '16 at 20:04
• there should be no extra space the way this is coded. however, there may be space added at the end of the files that are being read in. please show us (at least one of) these files so that it can be checked. – barbara beeton Jun 28 '16 at 20:05
• You could use \\[<len>] where you specify the length <len>. For example, \\[-10pt]. – Werner Jun 28 '16 at 20:11

I suggest you not use a tabular environment to accomplish your formatting objective. Instead, consider loading the subcaption package and using four subfigure environments inside the figure environment.

A notable advantage of this approach is that you can use LaTeX's \label-\ref cross-referencing mechanism for individual subfigures as well as for the figure as a whole.

\documentclass[demo]{article} % omit 'demo' option in real document
\usepackage{graphicx,subcaption}

\begin{document}

\begin{figure}
\captionsetup{size=small}

\begin{subfigure}{0.45\textwidth}
\includegraphics[width=\linewidth]{top_left_figure}
\caption{Subfigure 1} \label{fig:4picsa}
\end{subfigure}
\hfill
\begin{subfigure}{0.45\textwidth}
\includegraphics[width=\linewidth]{top_right_figure}
\caption{Subfigure 2} \label{fig:4picsb}
\end{subfigure}

\bigskip
\begin{subfigure}{0.45\textwidth}
\includegraphics[width=\linewidth]{bottom_left_figure}
\caption{Subfigure 3} \label{fig:4picsc}
\end{subfigure}
\hfill
\begin{subfigure}{0.45\textwidth}
\includegraphics[width=\linewidth]{bottom_right_figure}
\caption{Subfigure 4} \label{fig:4picsd}
\end{subfigure}

\caption{My title} \label{fig:4pics}
\end{figure}

\noindent
A cross-reference to Figure~\ref{fig:4pics}. Cross-references to Subfigures~\ref{fig:4picsa} and~\ref{fig:4picsd}.

\end{document}

• It is not clear to me how you change the spacing with this solution though? – Tom Aug 16 '19 at 10:16

Why do you use a tabular instead of a subfloat ?

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

\begin{figure}

\begin{minipage}{.5\linewidth}
\centering
\subfloat[Sub figure 1]{\label{fig_a}\includegraphics[width=\linewidth]{example-image-a}}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\subfloat[Sub figure 2]{\label{fig_b}\includegraphics[width=\linewidth]{example-image-b}}
\end{minipage}\par\medskip
\begin{minipage}{.5\linewidth}
\centering
\subfloat[Sub figure 3]{\label{fig_c}\includegraphics[width=\linewidth]{example-image-c}}
\end{minipage}%
\begin{minipage}{.5\linewidth}
\centering
\subfloat[Sub figure 4]{\label{fig_d}\includegraphics[width=\linewidth]{example-image-a}}
\end{minipage}
\caption{My title}
\label{fig_main}
\end{figure}

\end{document}


(source code from here)

• A tabular can do the job just fine, if no captions are needed. Package subfig on the other hand has problems with packages like hyperref. I consider it obsolete. A better alternative is often package ssubcaption. – Johannes_B Aug 28 '16 at 7:06