exportEpsPdf

版本 1.1.0.0 (3.3 KB) 作者: Daniel
exporte a figure to eps and pdf using laprint, latex and ghostscript (Requires laprint!!!)
1.1K 次下载
更新时间 2010/7/23

查看许可证

This functions uses laprint to generate the eps and tex for a matlab figure. To make this great function available to pdflatex, this funciton was created. It adds a document header to the tex file, compiles it, and converts eps to pdf (including the boundingbox optimisation)
Export a figure with:
set(0,'defaulttextinterpreter','none') % wichtig für laprint
h1=figure;
x=1:0.01:6;
plot(x,sin(x.^2+x))
xlabel('$x$ in m')
ylabel('$y=\sin( x^2+x)$ ')
exportEpsPdf('mytestfig','Ghostscript','C:\Programme\gs\gs8.71\bin\gswin32c.exe')

And include the images in latex without extension (latex will take the eps and pdflatex the pdf):

\begin{figure}
\includegraphics{bilder/mytestfig}
\caption{My MATLAB figure}
\end{figure}

引用格式

Daniel (2024). exportEpsPdf (https://www.mathworks.com/matlabcentral/fileexchange/28275-exportepspdf), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2010a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Printing and Saving 的更多信息
致谢

参考作品: LaPrint

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1.0.0

removed small bugs e.g. fn was set directly in the function

1.0.0.0