1

I have a 2-columns document and I have to include some figures composed by 3 subfigures on the entire width of the page. Using \begin{figure*} I obtain the correct displacement of the figures but they are not placed in the correct way inside the page: I want them above the title of the section but I am not able to do that. Can anyone help me?

*code updated

\documentclass[11pt,twocolumn,a4paper]{article}
\usepackage[english]{babel}
\usepackage[T1]{fontenc}
\usepackage{cite,url,color}
\usepackage{graphics,amsfonts}
\usepackage{epstopdf}
\usepackage[pdftex]{graphicx}
\usepackage[cmex10]{amsmath}
\interdisplaylinepenalty=2500
\usepackage[utf8]{inputenc}
\usepackage{csquotes}
\let\labelindent\relax
\usepackage{enumitem}
\usepackage{afterpage}


\usepackage{array}
\usepackage{mdwmath}
\usepackage{mdwtab}
\usepackage{subfigure}
\usepackage{subfig}

\usepackage[top=1.5cm, bottom=2cm, right=1.6cm,left=1.6cm]{geometry}
\usepackage{indentfirst}

\usepackage{times}
\usepackage{paralist}
\usepackage{breqn}
\usepackage{booktabs}

\setlength\parindent{0pt}
\linespread{1}

\begin{document}



\clearpage
\section*{Performance Evaluation}\label{sec:perf_eval}
\begin{figure*}[h]
\centering 
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 1 - SAD.}
\end{figure*}
\begin{figure*}[h]
\centering
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 1 - ZNCC.}
\end{figure*}
\begin{figure*}[h]
\centering
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 2 - SAD.}
\end{figure*}
\begin{figure*}[h]
\centering
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 2 - ZNCC.}
\end{figure*}
\clearpage
\begin{figure*}[h]
\centering
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 3 - SAD.}
\end{figure*}
\begin{figure*}[h]
\centering
\subfigure[Layer 1]{\includegraphics[width=0.31\textwidth]{example-image-a}}\quad
\subfigure[Layer 0]{\includegraphics[width=0.31\textwidth]{example-image-b}}\quad
\subfigure[Unlayered]{\includegraphics[width=0.31\textwidth]{example-image-c}}
\caption{Model 3 - ZNCC.}
\end{figure*}
\clearpage

\end{document}
  • 1
    Welcome to TeX.SE!, please complete yout MWE to be compiliable by people once they copy past it, ie: \documentclass ... \begin{document}...\end{document} – Cfun Jul 11 '16 at 15:24
  • figure* can be placed only on top or bottom of a page. – Zarko Jul 11 '16 at 15:30
  • It is nice that you show picture what you (like to) have. But more useful would be if you complete your code snipped to compilable small document which show your problem. An in code please considered example-image from graphicx package which is available to all. – Zarko Jul 11 '16 at 15:36
  • 1
    since h is not allowed for two column figures \begin{figure*}[h] leaves no legal place to place the figure, so it will go to the end of the document or next \clearpage – David Carlisle Jul 11 '16 at 15:44
  • So there is no way to do what I need? – user109863 Jul 11 '16 at 16:11

1 Answers1

1

In the case, that this figures are on the end of document, than the possible solution can be discontinuation of the twocolumn document format:

\documentclass[11pt,twocolumn]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[pdftex]{graphicx}
\usepackage{afterpage}

\usepackage{subfig}

\usepackage[a4paper,
            top=1.5cm, bottom=2cm, right=1.6cm,left=1.6cm,
            showframe]{geometry}
\usepackage{lipsum}

\setlength\parindent{0pt}
\linespread{1}

% making room for figure on the page
\renewcommand\topfraction{0.95}     % maximum size of the top area
\renewcommand\textfraction{0.05}    %c minimum size of the text area, i.e., the area that must not be occupied by floats

\begin{document}

\onecolumn  % <-- start with one column format
\section*{Performance Evaluation}\label{sec:perf_eval}
\begin{figure}[htb]
\centering
\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 1 - SAD.}

\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 1 - ZNCC.}

\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 2 - SAD.}
\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 2 - ZNCC.}
\end{figure}

\clearpage
\begin{figure}[ht]
\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 3 - SAD.}

\subfloat[Layer 1]{\includegraphics[width=0.3\textwidth]{example-image-a}}\hfil
\subfloat[Layer 0]{\includegraphics[width=0.3\textwidth]{example-image-b}}\hfil
\subfloat[Unlayered]{\includegraphics[width=0.3\textwidth]{example-image-c}}
\caption{Model 3 - ZNCC.}
\end{figure}

% \twocolumn (restore two columns, but it become effective on the next page)
\end{document}

Actually you need to solve two problems: (i) figure* appears on the page after its insertion text and (ii) if the float is bigger than as is default ratio is determined, it is moved to own page (for details see Frank Mittelbach answer). So, You can conclude that for your wish is not much room, hope that above (dirty) hack will help you. It gives (showed only first two rows of sub-figures):

enter image description here

Off-topic: don't load subfigure and subfig in the same time.

Zarko
  • 296,517