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 place two or more figures on top of the two-column page next to each other (horizontally). However, for some reason I can't do this. This is the code that I use, it puts the second figure in the new line. Why is that? Btw, figures are tiny and many of them can fit in one line.

\begin{figure*}[t]
\centering

\subfigure[Market revenue]{
{\epsfig{file = figures/graphs/revenue.pdf, width = 3cm}}
\label{fig:evaluation:revenue}
}

\subfigure[Average price]{
{\epsfig{file = figures/graphs/avgPrice.pdf, width = 3cm}}
\label{fig:evaluation:avgPrice}
}

\caption{Simulation results}
\end{figure*}
share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

Don't use an empty line between the two subfigures:

\begin{figure*}[t]
\centering

\subfigure[Market revenue]{%
{\epsfig{file = figures/graphs/revenue.pdf, width = 3cm}}%
\label{fig:evaluation:revenue}%
}\qquad
\subfigure[Average price]{%
{\epsfig{file = figures/graphs/avgPrice.pdf, width = 3cm}}%
\label{fig:evaluation:avgPrice}%
}

\caption{Simulation results}
\end{figure*}

However you should be using the package subfig instead of the obsolete subfigure and graphicx with its more powerful commands instead of epsfig (which should never be used in new documents, it exists only for compatibility with older ones).

\begin{figure*}[t]
\centering

\subfloat[Market revenue]{%
  \includegraphics[width=3cm]{figures/graphs/revenue}%
  \label{fig:evaluation:revenue}%
}\qquad
\subfloat[Average price]{%
  \includegraphics[width=3cm]{figures/graphs/avgPrice}%
  \label{fig:evaluation:avgPrice}%
}

\caption{Simulation results}
\end{figure*}
share|improve this answer
    
What package are these examples? It doesn't compile with graphicx and subfig for me. –  Magpie Jan 13 '13 at 19:00
add comment

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.