2

I have a row containing three images. How do I add another row of images below the existing one? This is my code

\begin{figure}
  \centering
  \subfloat[A gull]{\label{fig:gull}\includegraphics[width=0.3\textwidth]{gull}}                
  \subfloat[A tiger]{\label{fig:tiger}\includegraphics[width=0.3\textwidth]{tiger}}
  \subfloat[A mouse]{\label{fig:mouse}\includegraphics[width=0.3\textwidth]{mouse}}
  \caption{Pictures of animals}
  \label{fig:animals}
\end{figure}
Werner
  • 603,163
KiloWatt
  • 1,673

1 Answers1

2

The contents within a figure environment is treated like any part of the document in terms of typesetting (apart from some length changes). So, you can insert a paragraph break after the first three, which will insert a paragraph break between the image sets. If you want a larger gap, you can insert more vertical space.

Here is a mock-up of what you're after:

\begin{figure}
  \centering

  \hspace*{\fill}
  \subfloat[A gull]{\label{fig:gull}\includegraphics[width=0.3\textwidth]{gull}} \hfill
  \subfloat[A tiger]{\label{fig:tiger}\includegraphics[width=0.3\textwidth]{tiger}} \hfill
  \subfloat[A mouse]{\label{fig:mouse}\includegraphics[width=0.3\textwidth]{mouse}}
  \hspace*{\fill}

  \bigskip% or \medskip or \smallskip or \vspace{<len>}

  \hspace*{\fill}
  \subfloat[An elephant]{\label{fig:elephant}\includegraphics[width=0.3\textwidth]{elephant}} \hfill
  \subfloat[A leopard]{\label{fig:leopard}\includegraphics[width=0.3\textwidth]{leopard}} \hfill
  \subfloat[A sloth]{\label{fig:sloth}\includegraphics[width=0.3\textwidth]{sloth}}
  \hspace*{\fill}
  \caption{Pictures of animals}
  \label{fig:animals}
\end{figure}

I've inserted \bigskip, although the other listed vertical gap measures would also allow you to tweak the distance.

Using \hspace*{\fill}...\hfill...\hfill...\hspace*{\fill} allows one to distribute the images equally across the text block width. At the moment, you're only occupying 90% of \textwidth (3 images of width .3\textwidth). The aforementioned technique inserts 10% of \textwidth evenly distributed in the 4 spaces around the 3 images. Perhaps you're interested in that, perhaps not.

Note that it is better to put the elephant as far away from the mouse as possible...

Werner
  • 603,163