将图导出到eps文件 [英] exporting figure to eps file

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

问题描述

我正在尝试导出一个包括突出显示区域的图形-像这样:突出显示部分matlab图.不幸的是,当我将图形导出到.eps文件时,大小约为10 MB.因此,当我将它们包含在tex文件中时,质量会严重下降.正如预期的那样,由于使用area函数进行突出显示,似乎出现了此问题.有什么解决方法吗?

I am trying to export a figure which includes highlighting of regions - something like this: Highlight parts of matlab plot. Unfortunately, when I export the figures to .eps files the size is of the order of ~10 MB... Thus, when I include them in a tex file, the quality is severely degraded. As expected this problem seems to occur due to the use of the area function for the highlighting. Is there any workaround on this?

推荐答案

您在绘图中具有透明度,这要求渲染器为OpenGL,这将导致所有EPS都不真正成为矢量图形,但而是以某种奇怪的方式强制位图.这就是为什么文件大小比矢量图形要大得多的原因.如果使用外部编辑器(Illustrator,Inkscape等)打开生成的EPS文件,您将看到我在说什么.附带说明一下,EPS文件在技术上不支持透明性.

You have transparency in your plot which requires the renderer to be OpenGL which causes any EPS to not really be vector graphics but rather bitmaps coerced in some strange way. This is why the file size is much larger than what you would expect for vector graphics. If you open the resulting EPS file with an external editor (Illustrator, Inkscape, etc.) you will see what I am talking about. As a side-note, transparency isn't technically supported in EPS files.

您的选择确实是

  1. 将图形另存为TIFF或PNG

  1. Save your figures as something else such as TIFF or PNG

您可以尝试使用export_fig从文件交换中将图形另存为EPS,但是您仍然可能会遇到相同的问题.

You could try saving the figure as an EPS using export_fig from the file exchange but you will likely still have the same issue.

关闭透明度,保存到EPS,然后使用Illustrator或外部程序更改透明度,然后尝试另存为EPS文件,看看是否获得更好的结果.

Turn off transparency, save to an EPS, and use Illustrator or an external program to change the transparency and try to save as an EPS file and see if you get better results.

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

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