【问题标题】:Issue Matlab EPS figures发布 Matlab EPS 数字
【发布时间】:2015-07-30 16:25:45
【问题描述】:

我在创建要包含在 Latex 中的 EPS 图时遇到问题。不知何故,我无法在使用 Matlab 创建的图形上方放置标题。它被空格覆盖。我创建了一个最小的工作示例。 matlab中的图形是根据以下代码创建的:

plot(1:10)
title('A line')
print('test','-depsc2')

以及对应的latex文件:

\documentclass[a4paper]{article} 
\usepackage{graphicx} 
\begin{document} 
\begin{figure}[h]
    \caption{Caption is overwritten}
    \includegraphics[width=\textwidth]{test.eps}
\end{figure}
\end{document}

输出 pdf 中没有可见的标题。我是dvi-ps-pdf链。

这似乎是边界框值的问题。如果我添加到 graphicsx (\usepackage[draft]{graphicx}) 的草稿模式,则会出现标题。

感谢您的帮助。

最好的,罗伯

【问题讨论】:

  • 尝试使用来自 Matlabs FEX 的export_fig。 Google it ;) 一般可以解决所有与在 Matlab 中打印图形相关的问题。
  • 谢谢,我试试看

标签: matlab graphics latex eps


【解决方案1】:

尝试includegraphics 中的clip 选项:

\includegraphics[width=\textwidth, clip]{test.eps}

您可能还想在标题和图形之间添加一些垂直空间:

\caption{Caption is overwritten}
\vspace{5mm}
\includegraphics[width=\textwidth, clip]{test.eps}

【讨论】:

  • 非常感谢!该剪辑适用于工作示例,但在我的特定问题中剪切了标题。使用 \vspace 我能够解决它
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-01-07
  • 1970-01-01
  • 1970-01-01
  • 2011-01-29
  • 1970-01-01
  • 1970-01-01
  • 2013-09-21
相关资源
最近更新 更多