Latex在表格中添加图片

1、不添加图片

\end{table}
\begin{table}[h]
  \caption{Name of this table}
  \centering
  \begin{tabular}{ | c | l | l | }
    \hline
    Items & Advantages & Disadvantages \\ \hline
    item 1
    & blabla
    & blabla
    \\ \hline
  \end{tabular}
\end{table}

在这里插入图片描述
2、在表格中添加图片

\begin{table}[pbt]     %[pbt]:表格最优位置
\centering                % 表格居中
\caption{Three model results diagram.}  %表标题
\vspace{0.15cm}      % 表格与表标题之间的距离
\label{tab3}               % 表标签
\begin{tabular}{|c|c|c|c|}
\hline
\textbf{Model}                                                                    & \textit{\textbf{KIND}} & \textbf{Global Graph} & \textbf{Partial Graph} \\ \hline
\multirow{2}{*}{\textbf{XGBoost}}                                                 & \textit{Bitcoin}       & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                    &  \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                       \\ \cline{2-4}
                                                                                  & \textit{Gold}          & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                    & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                    \\ \hline
\multirow{2}{*}{\textbf{\begin{tabular}[c]{@{}c@{}}Random\\ Forest\end{tabular}}} & \textit{Bitcoin}       & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                      & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                       \\ \cline{2-4}
                                                                                  & \textit{Gold}          & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                      & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                       \\ \hline
\multirow{2}{*}{\textbf{LSTM}}                                                    & \textit{Bitcoin}       & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                      & \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                       \\ \cline{2-4}
                                                                                  & \textit{Gold}          &  \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                     &  \begin{minipage}[b]{0.3\columnwidth}
		\raisebox{-.5\height}{\includegraphics[width=\linewidth]{pic5/5-6Weldingeffect.pdf}}
	\end{minipage}                      \\ \hline
\end{tabular}

在这里插入图片描述
3、在表格中添加图片

\begin{table}[!ht]
\centering
% table caption is above the table
\caption{table figure}
\label{tab:Comparison}       % Give a unique label
% For LaTeX tables use
\begin{tabular}{cccc}
\hline
Model& \makecell[c]{Servo Robot\\
\begin{minipage}[b]{0.22\columnwidth}
    \centering
    {\includegraphics[width=0.9\textwidth]{pic5/5-6Weldingeffect.pdf}}
\end{minipage}
}& \makecell[c]{Meta Vision\\
\begin{minipage}[b]{0.22\columnwidth}
    \centering
    {\includegraphics[width=0.9\textwidth]{pic5/5-6Weldingeffect.pdf}}
\end{minipage}
}&\makecell[c]{Sensor\\
\begin{minipage}[b]{0.22\columnwidth}
    \centering
    {\includegraphics[width=0.9\textwidth]{pic5/5-6Weldingeffect.pdf}}
\end{minipage}} \\
\hline
Weight  & 0.8kg & 1kg & 1.3kg \\
Vision  & Linear   & Linear  & Hybrid\\
Function & \makecell[c]{Model\\Size}& \makecell[c]{Training\\Time}&\makecell[c]{Detection\\Time} \\
Function  & 6   & 7  & 8\\
Price & 2& 3 & 4\\
\hline
\end{tabular}
\end{table}

在这里插入图片描述

4、多行表格

\begin{tabular}{lcccc}
\hline
\multirow{2}{*}{Multi-Row}&
\multicolumn{2}{c}{Multi-Column}&
\multicolumn{2}{c}{\multirow{2}{*}{Multi-RowandCol}} \\
\cline{2-3}
  & column-1&column-2 & \multicolumn{2}{c}{}\\
\hline
label-1 & label-2&label-3 & label-4& label-5\\
\hline\\
\end{tabular}

在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值