将一张桌子和五个数字放在一起

将一张桌子和五个数字放在一起

我有一个两列文档,其中一个图形由三行 5 个子图形组成(1行->2 个图形,2行->2 个图形,3行->1 个图形)。

\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}

问题是最后一个子图浪费了一些空间。

为了填补这个空白,我想用在文档中出现过但标题仍位于顶部的表格替换第一行第一个子图(左边)。

\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}

此表格和图片的引用几乎位于文档末尾,有时会在参考书目引用之后编写。因此,我希望将表格和图片放在页面顶部或将它们放在没有其他内容的页面中。

非常感谢您的帮助

答案1

我认为没有理由使用\subfloat不带子标题的,因此我提出两种解决方案。subcaption根据您传递给 的选项,我猜您不能使用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}

在此处输入图片描述

如果您不想要子标题,则添加毫无意义\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}

在此处输入图片描述

答案2

我不确定你是否应该这样做,但你当然可以:

\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}

在此处输入图片描述

笔记:

  • 使用该[p]选项可使整个浮动显示在单个页面上。
  • 我手动将表格的标题放在里面,minipage以使其与表格的宽度相同。
  • 我更改了captionsetup第一行子浮点的设置,使其在顶部对齐。根据图像的实际大小,可能更适合使用其他设置。

相关内容