I use the following for side by side figures. However, the caption of the left figure is positioned higher than the right. How can I make the caption position be at the same line?
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}[H]
\centering
\begin{minipage}{.45\linewidth}
\includegraphics [width=\linewidth]{example-image-a}
\caption{Text for A}
\label{fig:VisJ48}
\end{minipage}
\hspace{.05\linewidth}
\begin{minipage}{.45\linewidth}
\includegraphics [width=\linewidth]{example-image-b}
\caption{Text for B}
\label{fig:TextJ48}
\end{minipage}
\end{figure}
\end{document}
Best Answer
Add
[b]
to minipages, it will vertically align them to the bottom.\begin{minipage}[b]{.45\linewidth}
As pointed out by Mico, there is no use for
\centering
here.Output
Code