Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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}
share|improve this question
    
What is the error you got? Did you remove [demo] from \usepackage[demo]{graphicx}? Please give some more details on your problem. –  Harish Kumar Jan 16 '13 at 3:34
    
Did you try putting the images in the same folder as your main .tex file? –  Harish Kumar Jan 16 '13 at 3:45
    
Note that you can use \graphicspath{{C:/Thesis/Latex/thesis_1(1)/Figures/}{c:/other/dir/}{..}} in the preamble to set a list of image directories. Then you only need to use the file (base)name of the image. You can even drop the .jpg extension (as long there are no other image types with the same basename). Also, maybe the (1) in the path causes an issue? –  Martin Scharrer Jan 16 '13 at 8:04
    
Is this the same issue as you posted as Multiple Plot query under a same caption with different labales problem? If so, please tell use so we can merge the questions. Please never double post issues, but rather edit you original question to improve it. This will also push it up to the front page again. –  Martin Scharrer Jan 16 '13 at 8:07
    
@HarishKumar, Yes I have removed it. –  user1885733 Jan 16 '13 at 9:35

1 Answer 1

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}
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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