Latex插入图片
程序员文章站
2022-05-21 17:54:07
...
1. 一张图片占两行
\begin{figure*}[htbp] %这个星号就是让你的图占满一行
\centering
\includegraphics[width=.95\linewidth]{SADgym-gazebo.png}
\caption{the SAD gym-gazebo architecture where left block represents the robot simulation environment, which including Autopilot, ROS, Gazebo, Gym and Server-Interface. right block represents the specific algorithm implementation. Which including algorithms, other functions and client-Interface.}
\label{fig}
\end{figure*}
2. 并排插入两张图片
\begin{figure}[htbp]
\subfigure[PPO]{
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics[height=4cm,width=4.2cm]{R-ppo.pdf}
\end{minipage}%
}
\subfigure[MADDPG]{
\begin{minipage}[t]{0.45\linewidth}
\centering
\includegraphics[height=4cm,width=4.2cm]{R-maddpg.pdf}
\end{minipage}
}
\caption{Comparison of single-UAV average Reward with A3C(a),AC(b) DDPG(c), DDQN(d) PPO(e) and MADDPG(f)}
\end{figure}
3. 并排插入多张图片(占两行)
\begin{figure*}[htbp]
\subfigure[A3C]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=6cm,width=6.2cm]{R-a3c.pdf}
\end{minipage}%
}
\subfigure[AC]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=6cm,width=6.2cm]{R-ac.pdf}
\end{minipage}
}
\subfigure[DDPG]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=6cm,width=6.2cm]{R-ddpg.pdf}
\end{minipage}%
}
\end{figure*}
\begin{figure*}[htbp]
\subfigure[Dueling DQN]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=6cm,width=6.2cm]{R-duelingDQN.pdf}
\end{minipage}%
}
\subfigure[PPO]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=6cm,width=6.2cm]{R-ppo.pdf}
\end{minipage}
}
\subfigure[MADDPG]{
\begin{minipage}[t]{0.32\linewidth}
\centering
\includegraphics[height=5cm,width=5.2cm]{R-maddpg.pdf}
\end{minipage}%
}
\caption{Comparison of single-UAV average Reward with A3C(a),AC(b) DDPG(c), DDQN(d) PPO(e) and MADDPG(f)}
\end{figure*}
4.插入表格
\begin{table}[htbp]
\centering
\caption{Different algorithm code change ratio}
\begin{tabular}{ccccccc}%l=left, r=right,c=center分别代表左对齐,右对齐和居中,字母的个数代表列数
\hline
Algorithms &A3C &AC &DDPG &Dueling DQN \\ \hline
Ratio &1.12& 1.22& 1.3& 1.8 \\ \hline
\end{tabular}
\end{table}
上一篇: Mysql优化原则_MySQL
下一篇: js验证电话号码手机号码的正则表达式