Graphics, Figures & TablesSide-by-side figure captions overlapping problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
erictamlam
Posts: 8
Joined: Sun Apr 29, 2012 7:41 am

Side-by-side figure captions overlapping problem

Post by erictamlam »

Hey guys,

I have been trying to place two figures that span half a column side-by-side. The two figures have their own captions. I used the minipage command and the figures did appear side by side, but their captions overlapped (the captions are sorta long, cf. the attached pic). How do I separate the captions? Please help me figure this out! Thanks :D

The tex code is as follows:

Code: Select all

\begin{figure}
\centering
\begin{minipage}{.5\columnwidth}
  \centering
  \includegraphics[width=\columnwidth]{optimality}
  \captionof{figure}{Average system cost of all schemes under different $V$ values}
  \label{fig:optimality}
\end{minipage}%
\begin{minipage}{.5\columnwidth}
  \centering
  \includegraphics[width=\columnwidth]{energycost}
  \captionof{figure}{Average energy cost and carbon footprints under different $V$ values}
  \label{fig:energycost}
\end{minipage}
\end{figure}
Attachments
QQ截图20130725142642.png
QQ截图20130725142642.png (46.3 KiB) Viewed 18164 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Side-by-side figure captions overlapping problem

Post by localghost »

That's no surprise since you have chosen 0.5\columnwidth for both figures. This is equivalent to 0.5\textwidth here so that there is no horizontal separating space. Choose e.g. 0.45\columnwidth and put a \hfill between the two {minipage} environments.


Thorsten
Post Reply