2

I have two figures, which I need each appearing in a single column, in an IEEE two-column style paper filling a single page. How to accomplish this?

Problem: Text comes in-between from elsewhere and can't control where to place each figure!

The order I put them is sequential and no text in-between in code:

\documentclass[conference]{IEEEtran}
\IEEEoverridecommandlockouts
\ifCLASSINFOpdf
\else
\fi
\usepackage{siunitx}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{array}
\usepackage{makecell, booktabs, multirow}
\usepackage{epstopdf}
\DeclareGraphicsExtensions{.eps}



\begin{document}
\begin{figure}[h]
\begin{center}
{\scalebox{0.75}{\includegraphics*{Fig4.pdf}}}\vspace{-0.1 cm}
\caption{flowchart 1 }
\label{fig:Fig_4}
\end{center}
\end{figure}

\begin{figure}[h]
\begin{center}
{\scalebox{0.75}{\includegraphics*{Fig5.pdf}}}\vspace{-0.1 cm}
\caption{flowchart 2}
\label{fig:Fig_5}
\end{center}
\end{figure}

\end{document}
AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Hans
  • 573
  • ,@Hans -- This happens when there is not enough space remaining in the column for both figures. Try deleting some text before the figures or make the figures smaller and see what happens! – AboAmmar Oct 06 '15 at 02:37
  • Do parameters like \textfraction apply to each column or just to the page as a whole? See http://tex.stackexchange.com/questions/39017/how-to-influence-the-position-of-float-environments-like-figure-and-table-in-lat – John Kormylo Oct 06 '15 at 03:40
  • I solved the issue by putting \begin{figure}[tp] for the 1st fig. and \begin{figure}[t] for the 2nd. It is good to exploit [place] here. – Hans Oct 06 '15 at 03:51
  • I'm voting to close this question as unclear, as the problem can't be reproduced from the given code. For more advice on how to better receive help, provide the community with a minimal working example (MWE) that replicates the problem. – Werner Oct 06 '15 at 05:11
  • Thanks, I'll try to follow. However, I had solved the above problem as stated earlier. – Hans Oct 06 '15 at 06:36

1 Answers1

2

If you want to be sure that the two figures are placed in the same column, put both images and captions in the same float. The only problem could be the default \belowcaptionskip in this class, but you can use the package caption to fix this, or simply insert by hand a vertical space between the figures, as in the MWE.

On the other hand, if the width of your images is less that the column use \centering instead of the center environment, otherwise you do not need center anything.

mwe

\documentclass[conference]{IEEEtran}
\usepackage{graphicx}
\usepackage{lipsum}
\begin{document}
\lipsum[2]
\begin{figure}[htb]
\includegraphics[width=\linewidth]{example-image-a}
\caption{flowchart 1 \label{fig:Fig_4}}
\vskip\abovecaptionskip 
\includegraphics[width=\linewidth]{example-image-b}
\caption{flowchart 2\label{fig:Fig_5}}
\end{figure}
\lipsum[3-5]
\end{document}
Fran
  • 80,769
  • thanks for the input! What does lipsum[2] or lipsum[3-5] do and why do you use its package? – Hans Oct 06 '15 at 07:59
  • @Hans the package lipsum simply write the paragraphs of dummy text (\lipsum[1] = "Lore ipsum dolor sit amet ... ") and it is only useful for examples or see the layout of a document. – Fran Oct 06 '15 at 08:15