MATLAB eps导出不';不包括图例框

MATLAB eps导出不';不包括图例框,matlab,matlab-figure,legend,eps,Matlab,Matlab Figure,Legend,Eps,我试图从MATLAB导出出版物质量中的数字,以便导入到LaTeX文档中 我可以设置我想要的所有图形属性,但是当我将图形导出为.eps时,图例周围的框消失了 MWE如下(我使用的是Matlab2014b): 乳胶: \usepackage{graphicx} \usepackage{epstopdf} %converting to PDF \begin{document} \includegraphics[width=\textwidth]{LineTest} \end{docume

我试图从MATLAB导出出版物质量中的数字,以便导入到LaTeX文档中

我可以设置我想要的所有图形属性,但是当我将图形导出为.eps时,图例周围的框消失了

MWE如下(我使用的是Matlab2014b):

乳胶:

\usepackage{graphicx}
\usepackage{epstopdf} %converting to PDF

\begin{document}

    \includegraphics[width=\textwidth]{LineTest}

\end{document}
这将产生以下结果,其中没有图例框:

使用Matlab 2016a和您的TeX文档对我来说效果很好。以下TeX文档也可以使用,试试看,可能是您的TeX编译器有问题:

\documentclass[a4paper]{article}
\usepackage[pdftex]{graphicx}

\begin{document}

    \includegraphics[width=\textwidth]{LineTest.eps}

\end{document}
在EPS图像上手动运行
epstopdf
,也会生成一个框中带有图例的PDF。您能否从命令行运行它,看看问题是否仍然存在


仅供参考我的
pdflatex版本

pdfTeX 3.14159265-2.6-1.40.16 (TeX Live 2015/Debian)
kpathsea version 6.2.1
Copyright 2015 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.6.17; using libpng 1.6.17
Compiled with zlib 1.2.8; using zlib 1.2.8
Compiled with poppler version 0.41.0

我也有类似的问题。我将两个数字保存为eps文件,并在Latex中使用它们。使用以下工具自动保存图形:

print(filename, '-depsc2', '-tiff')
我在命令中使用了TextStudio和Miktex 2.9:

\includegraphics[width=\textwidth]{filename.eps}
第一个文件在图例周围没有边界框,但第二个文件有


我发现的解决方法是手动保存图形(图→ 另存为…)另存为
filename.eps
。边界框随后出现在TexStudio中

嗯,当我从命令行运行eps2pdf时,给出了相同的结果,图例周围没有方框。运行tex文档会为我返回以下错误:未知的图形扩展名:.eps\includegraphics[width=\textwidth]{ALineTest.eps}我通常需要在序言中包含以下内容:\usepackage{epstopdf}@B.Thomas这可能是您的pdflatex版本的一个问题。那么,您使用的是什么操作系统?您是如何安装LaTeX的?我使用的是Windows 10(64位),不久前安装了LaTeX。我目前使用的是TextStudio,它使用的是Miktex 2.9。但是我不知道如何获得我的pdftex版本?@B.Thomas非常抱歉,但我不熟悉Windows/Miktex,希望另一个SOuser能够帮助您。
\includegraphics[width=\textwidth]{filename.eps}