# Two images in one line [duplicate]

This question already has an answer here:

How can set two images in one line without using a table, but having a caption and a label for each image? Besides image one should be labeled Figure 1 and the second figure with Figure 2. Therefore I want the following construction:

**************     *******************
*            *     *                 *
*            *     *                 *
**************     *******************
Figure 1: Caption  Figure 2: Caption


I tried already subfigure:

\begin{figure}[!ht]
\subfigure[caption]{\includegraphics[width=0.4\linewidth]{Screenshots/step1.png}}
\subfigure[caption]{\includegraphics[width=0.41\linewidth]{boundingbox.eps}}
\end{figure}


But this made (a) and (b) and one number for both figures.

Furthermore I tried:

\begin{table}[!ht]
\begin{tabular}{p{7cm} p{7cm}}
\begin{center}
\includegraphics[width=0.7\linewidth]{Screenshots/step1.png}
\label{fig:stepone}
\caption{caption one}
\end{center} & \begin{center}
\includegraphics[width=0.7\linewidth]{boundingbox.eps}
\label{fig:steptwo}
\caption{caption two}
\end{center} \\
\end{tabular}
\end{table}


But here the the columns are labeld with Table 1 and Table 2.

## marked as duplicate by Masroor, lockstep, Svend Tveskæg, Jesse, Peter JanssonJan 28 '14 at 18:08

Depending how you'd like the other figures in your document to be presented, you could simply redefine the caption for the subfigures as follows (based on this website):

\documentclass{article}

\usepackage[demo]{graphicx}
\usepackage{blindtext}
\usepackage{subfig}

\renewcommand{\thesubfigure}{Figure \arabic{subfigure}}
\captionsetup[subfigure]{labelformat=simple, labelsep=colon}
%\captionsetup[subfigure]{labelformat=parens, labelsep=colon}

\begin{document}

\blindtext

\begin{figure}[ht]
\centering
\subfloat[caption]{%
\includegraphics[width=0.4\linewidth]{Screenshots/step1.png}%
}%
\subfloat[caption]{%
\includegraphics[width=0.41\linewidth]{boundingbox.eps}%
}%
\end{figure}

\blindtext

\end{document}


• That won't work for me. I get the following error: No counter 'subfigure@save' defined. \subfloat – Irgendw Pointer Jan 28 '14 at 15:50
• Can you compile the MWE? When I look for the error message on google I find that it seems to happen when you use subcaption and subfigtogether: latex-community.org/forum/viewtopic.php?f=45&t=23576 – Habi Jan 29 '14 at 9:01