I need to place three images on a page with text under each, and then one 'overall' caption for the figure. This code puts the images on top of each other but the text is to the left of the images, I need the text under each image. E.g. n = 10 steps should be the text directly under the first image.
\begin{figure}[ht]
\centering
\subfigure[$n = 10$ steps]{
{\includegraphics[width=0.45\textwidth]{Raster/cw_10.png}
\label{cw_10}
}\\
\subfigure[$n = 25$ steps]{
{\includegraphics[width=0.45\textwidth]{Raster/cw_25.png}
\label{cw_25}
}\\
\subfigure[$n = 50$ steps]{
{\includegraphics[width=0.45\textwidth]{Raster/cw_50.png}
\label{cw_50}
}
\caption{Classical Random Walk with various step sizes.}
\label{TS}
\end{figure}
Best Answer
subfigure
is an obsolete package which shouldn't be used anymore. You can usesubfig
orsubcaption
instead. Below, an example using\subcaptionbox
fromsubcaption
:And with
subfig
:The
demo
option forgraphicx
simply replaces actual figures with black rectangles; do not use that option in your actual document.