Matlab将绘图导出为矢量格式 [英] matlab export plot to vector format

查看:103
本文介绍了Matlab将绘图导出为矢量格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前,我一直以栅格格式(JPG,PNG)导出Matlab图形

All the time previously I was exporting Matlab figures in a raster format (JPG, PNG)

有没有一种方法可以从Matlab中以矢量格式(SVG)导出绘图.我需要它来插入到LaTeX文档中.

Is there a way to export a plot from Matlab in a vector format (SVG). I need it to inset that plots into LaTeX document.

到目前为止,我发现的唯一一件事是来自 stackexchange ,但这看起来太复杂了

The only thing, I have found so far is a plugin from mathworks and the answer from stackexchange , but this looks rather too complicated

推荐答案

还有 matlab2tikz matlabfrag 导出到带有注释的eps以便导入到LaTeX.

There is also matlab2tikz and matlabfrag which exports to eps with annotation for importing to LaTeX.

此处是我使用过matlabfrag的示例.

Here is an example of mine where I've used matlabfrag.

我还与一位Mathworks工程师讨论了这一点,他同意没有一种现成的工具可用于这种事情,因为每个人都想用它做不同的事情(我已经提到了两种不同的LaTeX方法).因此,imo最好的办法是使用不同的工具,看看哪种最适合您.

I've also discussed this with a Mathworks engineer, who agreed that there is not a nice-and-ready tool for this kind of thing, because everybody wants to do different things with it (I already mention two different LaTeX approaches). So imo the best thing to do is to play around with different tools and see which suits you best.

大多数时候,我不得不对轴​​,标签的字体大小等进行大量修改,以使其完全符合我的要求(顺便说一下,调整图例是最大的麻烦).

Most of the times I had to tinker a lot with the axes, font size of labels, etc to get it exactly how I wanted (btw adjusting a legend is the greatest hell).

这篇关于Matlab将绘图导出为矢量格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆