2

I want to plot multiple figures under a same caption but the code doesn't work. This code doesn't appeared in plot:

\begin{figure}[htp]
        \centering
        \subfloat[a]{%
        \includegraphics[width=.44\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/h25.jpg}
        \label{fig:subb1}
        }%
        \hfill
        \subfloat[b]{%
        \includegraphics[width=.44\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/h28.jpg}
        \label{fig:subb2}
        }\\
        \subfloat[c]{%
        \includegraphics[width=.44\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/h29.jpg}
        \label{fig:subb3}
        }%
        \hfill
        \subfloat[d]{%
        \includegraphics[width=.44\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/h31.jpg}
        \label{fig:sub4}
        }\\
        \label{fig:esp1}
        \subfloat[e]{%
        \includegraphics[width=.44\textwidth]{C:/Thesis/Latex/thesis_1(1)/Figures/h32.jpg}
        \label{fig:subb5}
        }
                \rule{35em}{0.3pt}
        \caption{Temporal outlier detection reults with respect to the MF in $2007-09-30$}
    \label{fig:tod3}
\end{figure}
David Carlisle
  • 757,742
user1885733
  • 187
  • 5

1 Answers1

3

You need \par or a blank line before \rule, but otherwise your code is correct. Note that this code need two packages in the preamble:

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

In this way only black boxes are showed because the option [demo] but this the evidence that the LaTeX code is correct. Just delete [demo] to load really your images. In then there are still some error, the problem is a wrong path and/or filename. If you set both width an height options, use alsokeepaspectratio.

To debug put the images in the same directory that the .tex file and check for example that h25.jpg is loaded simply with h25 (extension .jpg is not needed) in this minimal document (of the same directory):

\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=1cm]{h25} 
\end{document}
Fran
  • 80,769