2

I have a two-columns document with a figure composed with 5 subfigures in three rows (1row->2 figures, 2row->2 figures, 3row->1 figure).

\usepackage[caption = false]{subfig}
.....
\begin{figure}[h]
    \centering
    \captionsetup[subfigure]{labelformat=empty}
\subfloat{\includegraphics[width = 0.49\textwidth]{eA1.pdf}} \hfill
\subfloat{\includegraphics[width = 0.49\textwidth]{eA2.pdf}}\    
\subfloat{\includegraphics[width = 0.49\textwidth]{eA3.pdf}}\hfill
\subfloat{\includegraphics[width = 0.49\textwidth]{eA4.pdf}}\
\subfloat{\includegraphics[width = 0.49\textwidth]{eA5.pdf}}
\caption{Estimation of the pdf for datasets of discovery samples of POIs $1$ to $5$.}
\label{fig:we-first-t}
\end{figure}

The problem is that the last subfigure makes to waste some space.

To fill that gap I would like to replace the first-row first subfigure (left one) with a table which appears before in the document but keeping its caption at the top.

\begin{table}[t]
    \centering
    \caption{Configuration parameters in static scenario}
      \label{tab:params}
\begin{tabular}{lc}
\toprule
Tourists & 100\\
Tourist speed & 5 Km/h\\
Speed variation & 0.3\\
Number of POIs & 5\\
popularity increment & 1\\
ER & 10\% \\
MPI (max) & 2 h  \\
POI-DI & 15 min \\
POI-AD & 40 m \\
Total discovery samples & \multirow{2}{*}{14400} \\ (each. mob. model) & \\
\bottomrule
\end{tabular}
\end{table}

This table and figures are referenced almost at the end of the document and sometimes happens to compile after the bibliography references. Thus, I would like to place tables and figures at the top of a page or place them in a page with nothing else.

Thank you very much for your help

2 Answers 2

1

I see no reason for using \subfloat without a subcaption, so I present two solutions. I guess you cannot use subcaption, based on the option you pass to subfig.

\documentclass[a4paper,twocolumn]{article}
\usepackage{graphicx}
\usepackage[caption=false]{subfig}
\usepackage{capt-of}
\usepackage{booktabs}

\begin{document}

\begin{figure*}[p]
\centering

\begin{minipage}[b]{.49\textwidth}
\centering
\captionof{table}{Configuration parameters in static scenario}\label{tab:params}

\begin{tabular}{lc}
\toprule
Tourists & 100\\
Tourist speed & 5\,km/h\\
Speed variation & 0.3\\
Number of POIs & 5\\
popularity increment & 1\\
ER & 10\% \\
MPI (max) & 2 h  \\
POI-DI & 15 min \\
POI-AD & 40 m \\
\begin{tabular}{@{}l@{}}
Total discovery samples \\
(each. mob. model) 
\end{tabular} & 14400 \\ 
\bottomrule
\end{tabular}

\vspace{0pt}

\end{minipage}\hfill
\subfloat[]{\includegraphics[width = 0.49\textwidth]{example-image}}

\subfloat[]{\includegraphics[width = 0.49\textwidth]{example-image}}\hfill
\subfloat[]{\includegraphics[width = 0.49\textwidth]{example-image}}

\subfloat[]{\includegraphics[width = 0.49\textwidth]{example-image}}\hfill
\subfloat[]{\includegraphics[width = 0.49\textwidth]{example-image}}

\caption{Estimation of the pdf for datasets of discovery samples of POIs $1$ to $5$.}
\label{fig:we-first-t}
\end{figure*}

\end{document}

enter image description here

If you don't want subcaption, there's no point in adding \subfloat:

\documentclass[a4paper,twocolumn]{article}
\usepackage{graphicx}
\usepackage[caption=false]{subfig}
\usepackage{capt-of}
\usepackage{booktabs}

\begin{document}

\begin{figure*}[p]
\centering

\begin{minipage}[b]{.49\textwidth}
\centering
\captionof{table}{Configuration parameters in static scenario}\label{tab:params}

\begin{tabular}{lc}
\toprule
Tourists & 100\\
Tourist speed & 5\,km/h\\
Speed variation & 0.3\\
Number of POIs & 5\\
popularity increment & 1\\
ER & 10\% \\
MPI (max) & 2 h  \\
POI-DI & 15 min \\
POI-AD & 40 m \\
\begin{tabular}{@{}l@{}}
Total discovery samples \\
(each. mob. model) 
\end{tabular} & 14400 \\ 
\bottomrule
\end{tabular}

\vspace{0pt}

\end{minipage}\hfill
\includegraphics[width = 0.49\textwidth]{example-image}

\medskip

\includegraphics[width = 0.49\textwidth]{example-image}\hfill
\includegraphics[width = 0.49\textwidth]{example-image}

\medskip

\includegraphics[width = 0.49\textwidth]{example-image}\hfill
\includegraphics[width = 0.49\textwidth]{example-image}

\caption{Estimation of the pdf for datasets of discovery samples of POIs $1$ to $5$.}
\label{fig:we-first-t}
\end{figure*}

\end{document}

enter image description here

0

I'm not sure you should really do this, but of course you can:

\documentclass{article}
\usepackage{subfig}
\usepackage[demo]{graphicx}

\begin{document}

\begin{figure}[p]
    \begin{minipage}{0.5\textwidth}
        \captionof{table}{Configuration parameters in static scenario}\vspace{-1em}
    \end{minipage}\\
    \captionsetup[subfigure]{labelformat=empty,position=top}
    \subfloat{\begin{tabular}{lc}
        \hline
        Tourists & 100\\
        Tourist speed & 5 Km/h\\
        Speed variation & 0.3\\
        Number of POIs & 5\\
        popularity increment & 1\\
        ER & 10\% \\
        MPI (max) & 2 h  \\
        POI-DI & 15 min \\
        POI-AD & 40 m \\
        Total discovery samples & 14400 \\ (each. mob. model) & \\
        \hline
    \end{tabular}} \hfill
    \subfloat{\includegraphics[width = 0.49\textwidth]{eA1.pdf}} \\
    \captionsetup[subfigure]{labelformat=empty,position=bottom}
    \subfloat{\includegraphics[width = 0.49\textwidth]{eA2.pdf}} \hfill
    \subfloat{\includegraphics[width = 0.49\textwidth]{eA3.pdf}} \\
    \subfloat{\includegraphics[width = 0.49\textwidth]{eA4.pdf}} \hfill
    \subfloat{\includegraphics[width = 0.49\textwidth]{eA5.pdf}}
    \captionof{figure}{Estimation of the pdf for datasets of discovery samples of POIs $1$ to $5$.}
    \label{fig:we-first-t}
\end{figure}

\end{document}

enter image description here

Note:

  • Use the [p] option to have the full float on a single page.
  • I manually put the caption of the table inside a minipage to have it at the same width as the table.
  • I changed the captionsetup for the first line of subfloats to align them on the top. Depending on the actual sizes of your images, a different setting might pe preferable.
2
  • Thank you very much, this is what I asked. I think it can result somehow confusing to place a table there because of the general figure caption at the bottom. The five subfigures should go together, and I do not see any other mode of placement. Probably the best choice is to place the 5 in one column. How could I make this? Regards Commented Aug 8, 2017 at 10:47
  • That's the reason for the initial sentence that you should probably not do that ;)
    – Tiuri
    Commented Aug 8, 2017 at 11:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .