I have an article with the following figure (there are 2 small charts near each other, horizontally):
\begin{figure}[h]
\centering
\includegraphics{left-graph}
\includegraphics{right-graph}
\caption{My caption}\label{mylabel}
\end{figure}
I reference the figure with:
Figure~\ref{fig:result} shows bla-bla-bla.
The rendered PDF shows ?? instead of the figure number. I tried with the reference occurring both before and after the figure (in the LaTeX source), but it didn't make a difference.
The relevant packages I'm using are below (those removed are for titling).
\usepackage[english]{babel}
\usepackage{graphicx}
\usepackage[letterpaper]{geometry}
\geometry{top=1.0in, bottom=1.0in, left=1.5in, right=1.0in}
\usepackage{flafter} % make sure figures do not appear before their text
\usepackage{sidecap} % use side captions for floats
\usepackage{subfig} % subfloats
I'm not sure what's wrong here, advice is appreciated. I'm using MiKTeX 2.8.
Thank you!
[h]is not much. I would add some options resulting in[htp]for instance. See http://texblog.net/help/latex/figure.html for reference. – Stefan Kottwitz Aug 17 '10 at 14:18