Latex中如何插入matlab的eps图片

用matlab生产一张figure后,用以下命令行可以实现将当前figure保存为eps文件

print log_f_vs_k.eps -depsc2 -r600

在latex中用以下语句插入:

\begin{figure}[!h]
  %\vspace{-0.2cm}
  \centering
   {\epsfig{file = matlab/log_f_vs_k.eps, width = 12cm, angle=-90}}
  \caption{speed of convergence}
  \label{fig speedofconvergence}
\end{figure}

其中,angle参数用来调节图片输出的方位,有时候print输出的eps图片会有90度翻转。当然该语句需要

\usepackage{epsfig}

用上述方式输出的eps有一个好处,就是规避了用save as直接输出可能会出现的坐标轴消失的bug。

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s