0

I need to put 2 figures side by side in LaTeX where the first figure needs to be given a caption and the second must not be given a caption. I have tried the following:

\usepackage{floatrow}

\begin{figure}[!h]
\begin{floatrow}
\ffigbox{\includegraphics[scale = 0.8]{Figure3}}{\caption{PTST based on total duration}\label{case1}}
\ffigbox{\includegraphics[scale = 0.8]{app1}}{\caption{A zoom}\label{zoom}}
\end{floatrow}
\end{figure}

but I am getting the error do not use float package with float row since I also have \usepackage{float} for other images (I need this).

3

You can use the subcaption package.

Try something like this.

\documentclass{article}
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage{subcaption}


\begin{document}
\begin{figure}
\centering
\begin{subfigure}{0.49\textwidth}
\centering
\includegraphics[width = \textwidth]{tikzexample2.png}
\caption{Left figure}
\label{fig:left}
\end{subfigure}
\begin{subfigure}{0.49\textwidth}
\centering
\includegraphics[width = \textwidth]{tikzexample2.png}
\caption{Right figure}
\label{fig:right}
\end{subfigure}
\caption{Combined figure}
\label{fig:combined}
\end{figure}
\end{document}

It yields the following output.

output example

2

May be is not what you wanted (since you have accepted a answer with two subcaptions) but is what your asked ("the second must not be given a caption"):

MWE

\documentclass{article}
\usepackage{graphicx,lipsum}
\begin{document}
\lipsum[2]

\begin{figure}[h] % Do not use only [h] in real documents.
\begin{minipage}[t]{.45\linewidth}
\includegraphics[width=\linewidth]{example-image-a}
\caption{ figure}
\end{minipage}\hfill
\begin{minipage}[b]{.45\linewidth}
\includegraphics[width=\linewidth]{example-image-b}
\end{minipage}
\end{figure}
\lipsum[3]

\end{document}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.